<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>The Math Root: Recent Posts</title>
<link>http://www.mathroot.com/</link>
<description>The Math Root: Recent Posts</description>
<language>en</language>
<pubDate>Fri, 30 Jul 2010 17:15:14 +0000</pubDate>

<item>
<title>sally1987 on "How to import multiple excel files into matlab"</title>
<link>http://www.mathroot.com/topic.php?id=18#post-28</link>
<pubDate>Wed, 23 Jun 2010 09:29:17 +0000</pubDate>
<dc:creator>sally1987</dc:creator>
<guid isPermaLink="false">28@http://www.mathroot.com/</guid>
<description>&#60;p&#62;I have a code to import an excel file into matlab but I need to import around 250 of these files. Does anyone know how to write a loop for this or is there another way to load them all at one? The code I am using is below.&#60;/p&#62;
&#60;p&#62;data = importdata('filename')&#60;/p&#62;
&#60;p&#62;textdata = data.textdata;&#60;/p&#62;
&#60;p&#62;data = data.data;&#60;/p&#62;
&#60;p&#62;t_date =  datenum(textdata(:,1),2);&#60;/p&#62;
&#60;p&#62;x_date =  datenum(textdata(:,3),'mmmyy');&#60;/p&#62;
&#60;p&#62;yr = year(x_date);&#60;/p&#62;
&#60;p&#62;mth = month(x_date);&#60;/p&#62;
&#60;p&#62;for i=1:length(x_date)&#60;/p&#62;
&#60;p&#62;    calend = calendar(yr(i),mth(i));&#60;/p&#62;
&#60;p&#62;    if calend(1,1:6) == zeros(1,6)&#60;br /&#62;
        dy = calend(4,6);&#60;br /&#62;
    else&#60;br /&#62;
        dy = calend(3,6);&#60;br /&#62;
    end&#60;/p&#62;
&#60;p&#62;    x_date(i) = datenum(yr(i),mth(i),dy);  &#60;/p&#62;
&#60;p&#62;end&#60;/p&#62;
&#60;p&#62;calput = 1.*strcmp(textdata(:,4),'C') + 2.*strcmp(textdata(:,4),'P');
&#60;/p&#62;</description>
</item>
<item>
<title>muerte on "Save files"</title>
<link>http://www.mathroot.com/topic.php?id=17#post-27</link>
<pubDate>Mon, 07 Jun 2010 23:05:34 +0000</pubDate>
<dc:creator>muerte</dc:creator>
<guid isPermaLink="false">27@http://www.mathroot.com/</guid>
<description>&#60;p&#62;I'm using winxp, NTFS file system on all drives.&#60;br /&#62;
I use the save command to save my variables 'specifically a neural network' to a .mat file.&#60;br /&#62;
The problem is, I can't see or access my file except using matlab.&#60;br /&#62;
It's totally invisible to windows, I can't write it to disk, I can't e-mail it, can't even see it in windows explorer, tried showing system and hidden files, tried Dir/a on CMD, but no use.&#60;/p&#62;
&#60;p&#62;How can I resolve this problem so that I can backup and e-mail my .mat files?
&#60;/p&#62;</description>
</item>
<item>
<title>Infobiz on "XML Elements preallocation, possible?"</title>
<link>http://www.mathroot.com/topic.php?id=16#post-26</link>
<pubDate>Wed, 02 Jun 2010 13:35:39 +0000</pubDate>
<dc:creator>Infobiz</dc:creator>
<guid isPermaLink="false">26@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Hi,&#60;br /&#62;
i need to know how to preallocate this &#34;structure&#34; because i need a performance increase ( 8 mins for this is too much to wait), can u help me?&#60;/p&#62;
&#60;p&#62;documento=com.mathworks.xml.XMLUtils.createDocument('ospedale');&#60;br /&#62;
ospedale=documento.getDocumentElement;&#60;br /&#62;
ospedale.setAttribute('azienda',num2str(azienda(1)));&#60;/p&#62;
&#60;p&#62;for i=1:length(codice_nosologico) %&#38;lt;----- this is 15901 long&#60;br /&#62;
    pratica(i)=documento.createElement('pratica');&#60;br /&#62;
    ospedale.appendChild(pratica(i));&#60;br /&#62;
end
&#60;/p&#62;</description>
</item>
<item>
<title>arni on "isimage?"</title>
<link>http://www.mathroot.com/topic.php?id=15#post-25</link>
<pubDate>Thu, 06 May 2010 16:53:57 +0000</pubDate>
<dc:creator>arni</dc:creator>
<guid isPermaLink="false">25@http://www.mathroot.com/</guid>
<description>&#60;p&#62;I often write image manipulation code to apply to geophyisical residual data or DEM, with all sorts of value ranges, including negative values.&#60;/p&#62;
&#60;p&#62;Is there any built in function in Matlab that would test input data to verify if it is an image (say with values within standard intensity range), and if not it converts it using mat2gray. &#60;/p&#62;
&#60;p&#62;If not, does anybody have any suggestion as to how it could be accomoplished? Thank you
&#60;/p&#62;</description>
</item>
<item>
<title>anna on "XML Toolbox for MATLAB"</title>
<link>http://www.mathroot.com/topic.php?id=14#post-24</link>
<pubDate>Wed, 17 Mar 2010 19:15:40 +0000</pubDate>
<dc:creator>anna</dc:creator>
<guid isPermaLink="false">24@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I have to design a program in Matlab to calculate different plots from XML template.&#60;br /&#62;
I mean, I have a xml with some specifications according to a DTD document. The template is not unique, the user can change the template to obtain different things. My goal is to design a program what interpretes the xml template (either xml template with the requirements of the DTD) and to obtain the correspondence output.&#60;/p&#62;
&#60;p&#62;I have read about this and I am sure that the first step is to use 'xmlread'. I have found some functions like .getElementsByTagName but I am not sure how to manage because I have never programmed in Java and I don't know how to read all the variables that I have in my xml. Also, I don't know how to visualize in Matlab this information.&#60;/p&#62;
&#60;p&#62;If someone can help, please, it would be really useful for me.&#60;br /&#62;
Thanks,&#60;br /&#62;
Anna
&#60;/p&#62;</description>
</item>
<item>
<title>pmacaodh on "XML Toolbox for MATLAB"</title>
<link>http://www.mathroot.com/topic.php?id=14#post-23</link>
<pubDate>Sat, 27 Feb 2010 04:35:41 +0000</pubDate>
<dc:creator>pmacaodh</dc:creator>
<guid isPermaLink="false">23@http://www.mathroot.com/</guid>
<description>&#60;p&#62;By the way, you can copy the above into Matlab as is to try it out.  Just change the filename and ensure it is in your current working directory.&#60;/p&#62;
&#60;p&#62;Of course, this message board interpreted my example XML elements as a HTML 'A' hyperling tag.  The example was meant to look like so:&#60;/p&#62;
&#60;p&#62;&#38;lt;xml&#38;gt;&#60;br /&#62;
   &#38;lt;AA&#38;gt;42&#38;lt;/AA&#38;gt;&#60;br /&#62;
   &#38;lt;B&#38;gt;12&#38;lt;/B&#38;gt;&#60;br /&#62;
&#38;lt;/xml&#38;gt;&#60;/p&#62;
&#60;p&#62;...and so on.
&#60;/p&#62;</description>
</item>
<item>
<title>pmacaodh on "XML Toolbox for MATLAB"</title>
<link>http://www.mathroot.com/topic.php?id=14#post-22</link>
<pubDate>Sat, 27 Feb 2010 04:32:13 +0000</pubDate>
<dc:creator>pmacaodh</dc:creator>
<guid isPermaLink="false">22@http://www.mathroot.com/</guid>
<description>&#60;p&#62;% Presuming the variables are stores as elements, and the file is like this:&#60;br /&#62;
% &#38;lt;xml&#38;gt;&#60;br /&#62;
%   &#60;a&#62;10&#60;/a&#62;&#60;br /&#62;
% &#38;lt;/xml&#38;gt;&#60;/p&#62;
&#60;p&#62;% Read the xml file into memory:&#60;/p&#62;
&#60;p&#62;docNode = xmlread( 'insert_your_filename_here.xml' );&#60;/p&#62;
&#60;p&#62;% Then you just use the JAVA DOM (http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Element.html)&#60;br /&#62;
% For example, to retrieve the nodes for the elements A and B:&#60;/p&#62;
&#60;p&#62;ANodeList = docNode.getElementsByTagName('A'); % returns a reference to all the A elements, i.e. everything in the xml with this pattern &#60;a&#62;..&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;%Iterate over the node list to read the values of A&#60;br /&#62;
for i = 1:ANodeList.getLength()&#60;br /&#62;
   A(i) = ANodeList.ANodeList.item(i-1).getNodeValue&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;% of course, everything you read is a string, so if they are numeric variables, you need to use str2double() to make them numeric&#60;br /&#62;
   ANumeric = str2double(A);
&#60;/p&#62;</description>
</item>
<item>
<title>Lucy on "XML Toolbox for MATLAB"</title>
<link>http://www.mathroot.com/topic.php?id=14#post-21</link>
<pubDate>Sat, 13 Feb 2010 16:35:43 +0000</pubDate>
<dc:creator>Lucy</dc:creator>
<guid isPermaLink="false">21@http://www.mathroot.com/</guid>
<description>&#60;p&#62;I have been trying to use this for quite a while, but i just cant understand how to retrieve data from a .XML file in MATLAB.&#60;/p&#62;
&#60;p&#62;I have an XML file with 2 important variables i need to retrieve the value for. These are 'A' and 'B'. There are many different values for 'A' and 'B' and i would like to parse the .XML file to save all values for 'A' are saved into an array and all values for 'B' are saved into an array.&#60;/p&#62;
&#60;p&#62;I have read a tutorial but i still cant figure it out.&#60;/p&#62;
&#60;p&#62;Any help would be much appreciated.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Lucy
&#60;/p&#62;</description>
</item>
<item>
<title>cool_breeze on "MS THESIS"</title>
<link>http://www.mathroot.com/topic.php?id=12#post-19</link>
<pubDate>Sun, 24 Jan 2010 16:06:37 +0000</pubDate>
<dc:creator>cool_breeze</dc:creator>
<guid isPermaLink="false">19@http://www.mathroot.com/</guid>
<description>&#60;p&#62;PLEASE HELP
&#60;/p&#62;</description>
</item>
<item>
<title>cool_breeze on "MS THESIS"</title>
<link>http://www.mathroot.com/topic.php?id=12#post-18</link>
<pubDate>Sun, 24 Jan 2010 16:06:04 +0000</pubDate>
<dc:creator>cool_breeze</dc:creator>
<guid isPermaLink="false">18@http://www.mathroot.com/</guid>
<description>&#60;p&#62;This is code for parallel interference cancelltion in ds cdma using matrix algebraic approach.&#60;br /&#62;
Please check the code and let me know if iam doin any mistake . Also I need to apply slow and fast rayleigh fading in this model. &#60;/p&#62;
&#60;p&#62;The rcd signal is R = SAB + N&#60;br /&#62;
where R,S,A,B are matrices&#60;br /&#62;
The matlab code is given below :&#60;br /&#62;
close all&#60;br /&#62;
clear all;&#60;br /&#62;
clc;&#60;br /&#62;
warning off all &#60;/p&#62;
&#60;p&#62;K = 27; %No. of users&#60;br /&#62;
Navg = 1e3; %No. of repititions&#60;br /&#62;
snr = 5:1:25; %SNR RANGE &#60;/p&#62;
&#60;p&#62;Sv = (10.^(-snr/10)); %Noise variance in different SNR&#60;br /&#62;
A = eye(K); %input power&#60;br /&#62;
%Get signature sequences&#60;br /&#62;
load GS31;&#60;br /&#62;
S = GS31(1:K,;&#60;br /&#62;
S= S';&#60;br /&#62;
Lc = length(S(:,1));&#60;br /&#62;
Sn= S./sqrt(Lc); %Normalize energy of signature waveforms&#60;br /&#62;
R = Sn'*Sn; % Calculate correlation matrix &#60;/p&#62;
&#60;p&#62;corr=(R-eye(size(R))); &#60;/p&#62;
&#60;p&#62;h = waitbar(0,'WAIT...');&#60;br /&#62;
for t = 1:Navg&#60;br /&#62;
waitbar(t/Navg);&#60;br /&#62;
for j = 1:length(snr)&#60;br /&#62;
noise =(Sv(j))^.5*randn(Lc,1);&#60;br /&#62;
b=2*(randint(K,1)-0.5);&#60;br /&#62;
BT=Sn*A*b;&#60;br /&#62;
r=awgn(BT,snr(j));&#60;br /&#62;
% r=BT+noise;&#60;br /&#62;
y = Sn'*r; &#60;/p&#62;
&#60;p&#62;ysdec = inv(R)*Sn'*r; &#60;/p&#62;
&#60;p&#62;YMF = sign(y);&#60;br /&#62;
YDEC= sign(ysdec);&#60;br /&#62;
novector(1:K) = Sv(j);&#60;br /&#62;
sigma2= diag(novector); &#60;/p&#62;
&#60;p&#62;t1=R+sigma2;&#60;br /&#62;
ysmmse = (inv ( t1 ))* y;&#60;br /&#62;
YMMSE= sign(ysmmse); &#60;/p&#62;
&#60;p&#62;%%CPIC &#60;/p&#62;
&#60;p&#62;yinit=zeros(K,1);&#60;br /&#62;
ypic1= (Sn'*r) + yinit ;&#60;br /&#62;
YPIC1 = sign(ypic1); &#60;/p&#62;
&#60;p&#62;yinit2=ypic1;&#60;br /&#62;
ypic2=(Sn'*r) - ( corr*A*yinit2 );&#60;br /&#62;
YPIC2 = sign(ypic2); &#60;/p&#62;
&#60;p&#62;yinit3=ypic2;&#60;br /&#62;
ypic3=(Sn'*r) - ( corr*A*yinit3 );&#60;br /&#62;
YPIC3 = sign(ypic3); &#60;/p&#62;
&#60;p&#62;yinit4= ypic3;&#60;br /&#62;
ypic4=(Sn'*r) - ( corr*A*yinit4 );&#60;br /&#62;
YPIC4 = sign(ypic4); &#60;/p&#62;
&#60;p&#62;yinit5= ypic4;&#60;br /&#62;
ypic5=(Sn'*r) - ( corr*A*yinit5 );&#60;br /&#62;
YPIC5 = sign(ypic5); &#60;/p&#62;
&#60;p&#62;yinit6=ypic5;&#60;br /&#62;
ypic6=(Sn'*r) - ( corr*A*yinit6 );&#60;br /&#62;
YPIC6 = sign(ypic6); &#60;/p&#62;
&#60;p&#62;yinit7=ypic6;&#60;br /&#62;
ypic7=(Sn'*r) - ( corr*A*yinit7 );&#60;br /&#62;
YPIC7 = sign(ypic7); &#60;/p&#62;
&#60;p&#62;yinit8=ypic7;&#60;br /&#62;
ypic8=(Sn'*r) - ( corr*A*yinit8 );&#60;br /&#62;
YPIC8 = sign(ypic8); &#60;/p&#62;
&#60;p&#62;ERMF(j)= length(find (YMF ~= b))/K;&#60;br /&#62;
ERDEC(j)= length(find (YDEC ~= b))/K;&#60;br /&#62;
ERMMSE(j)= length(find (YMMSE ~= b))/K;&#60;br /&#62;
ERPIC1(j)= length(find (YPIC1 ~= b))/K;&#60;br /&#62;
ERPIC2(j)= length(find (YPIC2 ~= b))/K;&#60;br /&#62;
ERPIC3(j)= length(find (YPIC3 ~= b))/K;&#60;br /&#62;
ERPIC4(j)= length(find (YPIC4 ~= b))/K;&#60;br /&#62;
ERPIC5(j)= length(find (YPIC5 ~= b))/K;&#60;br /&#62;
ERPIC6(j)= length(find (YPIC6 ~= b))/K;&#60;br /&#62;
ERPIC7(j)= length(find (YPIC7 ~= b))/K;&#60;br /&#62;
ERPIC8(j)= length(find (YPIC8 ~= b))/K;&#60;br /&#62;
end&#60;br /&#62;
EERMF(t,=ERMF;&#60;br /&#62;
EERDEC(t,=ERDEC;&#60;br /&#62;
EERMMSE(t,=ERMMSE;&#60;br /&#62;
EERPIC1(t,=ERPIC1;&#60;br /&#62;
EERPIC2(t,=ERPIC2;&#60;br /&#62;
EERPIC3(t,=ERPIC3;&#60;br /&#62;
EERPIC4(t,=ERPIC4;&#60;br /&#62;
EERPIC5(t,=ERPIC5;&#60;br /&#62;
EERPIC6(t,=ERPIC6;&#60;br /&#62;
EERPIC7(t,=ERPIC7;&#60;br /&#62;
EERPIC8(t,=ERPIC8;&#60;br /&#62;
end &#60;/p&#62;
&#60;p&#62;BERMF = smooth(mean(EERMF,1));&#60;br /&#62;
BERDEC = smooth(mean(EERDEC,1));&#60;br /&#62;
BERMMSE = smooth(mean(EERMMSE,1));&#60;br /&#62;
BERPIC1 = smooth(mean(EERPIC1,1));&#60;br /&#62;
BERPIC2 = smooth(mean(EERPIC2,1));&#60;br /&#62;
BERPIC3 = smooth(mean(EERPIC3,1));&#60;br /&#62;
BERPIC4 = smooth(mean(EERPIC4,1));&#60;br /&#62;
BERPIC5 = smooth(mean(EERPIC5,1));&#60;br /&#62;
BERPIC6 = smooth(mean(EERPIC6,1));&#60;br /&#62;
BERPIC7 = smooth(mean(EERPIC7,1));&#60;br /&#62;
BERPIC8 = smooth(mean(EERPIC8,1)); &#60;/p&#62;
&#60;p&#62;semilogy(snr,BERMF,'k*-',snr,BERPIC1,'m^-',snr,BERPIC2,'rs-',snr,BERPIC3,'yo-',snr,BERPIC4,'k&#38;lt;-',snr,BERPIC5,'c^-',snr,BERPIC6,'y^-',snr,BERPIC7,'r&#38;gt;-',snr,BERPIC8,'bs-',snr,BERDEC,'g*-',snr,BERMMSE,'go-');&#60;br /&#62;
grid on&#60;br /&#62;
xlabel('SNR')&#60;br /&#62;
ylabel('Average BER')&#60;br /&#62;
legend('MF','Stage1','Stage2','Stage3','Stage4','Stage5','Stage6','Stage7','Stage8','DECOR','MMSE')&#60;br /&#62;
title('BER vs SNR--Conventional PIC-25 Users -AWGN Channel')&#60;br /&#62;
close(h) &#60;/p&#62;
&#60;p&#62;Added after 1 minutes: &#60;/p&#62;
&#60;p&#62;Dear all, &#60;/p&#62;
&#60;p&#62;The : ) got replaced by a smiley. &#60;/p&#62;
&#60;p&#62;I need urgent help regarding fading&#60;br /&#62;
thanks in advance
&#60;/p&#62;</description>
</item>
<item>
<title>ElGamal on "Create Login page (GUI)"</title>
<link>http://www.mathroot.com/topic.php?id=9#post-17</link>
<pubDate>Tue, 14 Jul 2009 09:39:37 +0000</pubDate>
<dc:creator>ElGamal</dc:creator>
<guid isPermaLink="false">17@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Of course, if your application has more than one legal user, you probably will also need to hard-code more than one password. And things do get tricky when the number of potential users is not known at the time you release the application...&#60;/p&#62;
&#60;p&#62;A feasible alternative in this case is to go for license keys which embed user/corporate information in encrypted format. The application should parse the license key before starting and launch only if a valid license key is found. This is what is normally done on MS Windows applications, and the approach also facilitates limited duration license keys and hardware locking (whereby application execution is forbidden on other computers to prevent unlicensed distribution). &#60;/p&#62;
&#60;p&#62;There is a range of examples of various possibilities in relation to the above downloadable at &#60;a href=&#34;http://www.algorithmprotection.com&#34; rel=&#34;nofollow&#34;&#62;http://www.algorithmprotection.com&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "Creating a basic plot with matplotlib"</title>
<link>http://www.mathroot.com/topic.php?id=11#post-16</link>
<pubDate>Thu, 21 May 2009 17:18:20 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">16@http://www.mathroot.com/</guid>
<description>&#60;p&#62;If you have numpy and matplotlib installed, creating your first plot is very simple.&#60;br /&#62;
Let's say that you have a list of numbers in a variable called 'myvar'&#60;br /&#62;
For ex: myvar = [1,2,5,7,3,4]&#60;/p&#62;
&#60;p&#62;Here's how you can plot it:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
&#60;pre&#62;
import matplotlib.pyplot as plt

plt.plot(myvar)

plt.ylabel('My Var')
plt.xlabel('Time Samples')
plt.title('My Fancy Plot')
plt.show()
&#60;/pre&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;More about how to make fancier plots later.
&#60;/p&#62;</description>
</item>
<item>
<title>Ti_me on "Filtering startup- &#038; terminal-transient; SG 1th derivative"</title>
<link>http://www.mathroot.com/topic.php?id=10#post-15</link>
<pubDate>Wed, 06 May 2009 11:22:52 +0000</pubDate>
<dc:creator>Ti_me</dc:creator>
<guid isPermaLink="false">15@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Hello&#60;/p&#62;
&#60;p&#62;I am trying to generate the 1st derivative of a signal vector X using the Savitzky-Golay-Filter method. With the use of function &#34;[B,G]=sgolay(k,f)&#34;, a matrix G can be loaded containing differentiators of any orders which can be used as FIR b coefficients.&#60;/p&#62;
&#60;p&#62;The problem is that there are no filter coefficients in G for the startup- and terminal-transient of X. How can I get them, or is there an other option to get the derivative?
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "Create Login page (GUI)"</title>
<link>http://www.mathroot.com/topic.php?id=9#post-14</link>
<pubDate>Thu, 30 Apr 2009 08:14:51 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">14@http://www.mathroot.com/</guid>
<description>&#60;p&#62;This link from the file-exchange should help you&#60;br /&#62;
&#60;a href=&#34;http://blogs.mathworks.com/pick/2007/10/05/masking-typed-passwords-with-asterisks/&#34; rel=&#34;nofollow&#34;&#62;http://blogs.mathworks.com/pick/2007/10/05/masking-typed-passwords-with-asterisks/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "Create Login page (GUI)"</title>
<link>http://www.mathroot.com/topic.php?id=9#post-13</link>
<pubDate>Thu, 30 Apr 2009 07:50:14 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">13@http://www.mathroot.com/</guid>
<description>&#60;p&#62;There is a lot of information on the Matlab website on creating GUIs. If your application is simple without the need for any serious security, you should be able to simply compare the entered password with a saved one. &#60;/p&#62;
&#60;p&#62;Start here &#60;a href=&#34;http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/creating_guis/bqz79mu.html&#38;#38;http://blogs.mathworks.com/steve/matlab-gui-programming-resources/&#34;&#62;with these resources &#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>muni86 on "Create Login page (GUI)"</title>
<link>http://www.mathroot.com/topic.php?id=9#post-12</link>
<pubDate>Sat, 18 Apr 2009 17:39:23 +0000</pubDate>
<dc:creator>muni86</dc:creator>
<guid isPermaLink="false">12@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Do you know how to build a GUI using Matlab that take in &#34;username&#34; and &#34;password&#34;?&#60;br /&#62;
The system have to ensure that the password is correct in order for the user to proceed.
&#60;/p&#62;</description>
</item>
<item>
<title>Glavina on "HOWTO: Creating XML output with Matlab"</title>
<link>http://www.mathroot.com/topic.php?id=4#post-11</link>
<pubDate>Thu, 19 Mar 2009 17:18:31 +0000</pubDate>
<dc:creator>Glavina</dc:creator>
<guid isPermaLink="false">11@http://www.mathroot.com/</guid>
<description>&#60;p&#62;I have one doubt here: what is the size limit to create a xml function this way.&#60;br /&#62;
I tried to use this technique, storing the value of 25 vectors (it would create a type of matrix 9x25), but its not working. I think its because of the method to do it, &#34;&#38;lt;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#38;gt;&#34;, but there's a way to do it differently?&#60;/p&#62;
&#60;p&#62;Pls, any help?
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "TIP: Matlab toolbox for sigma-delta modulators"</title>
<link>http://www.mathroot.com/topic.php?id=8#post-10</link>
<pubDate>Sat, 28 Feb 2009 17:03:26 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">10@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Richard Schreier's Matlab toolbox for the design and analysis of sigma-delta modulators can be downloaded for free from &#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/19&#34;&#62;here&#60;/a&#62;. It works with R14 and higher.&#60;/p&#62;
&#60;p&#62;If you ever work on the actual design of a sigma-delta modulator, this toolbox is immensely useful. It synthesizes the modulator given a noise transfer function, simulates the modulator for a given input, and also gives you realizable structures to implement the modulator. Plus a whole lot of other neat things. It comes with a very well-documented help file.
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "TIP: Profiling your code"</title>
<link>http://www.mathroot.com/topic.php?id=7#post-9</link>
<pubDate>Sat, 28 Feb 2009 16:44:29 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">9@http://www.mathroot.com/</guid>
<description>&#60;p&#62;If you have complex Matlab code that's resource hungry, find the bottlenecks by profiling your code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;profile on
&#38;lt;run your script here&#38;gt;
profile off
profile report&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Anil on "HOWTO: Saving data using string (variable) filenames in Matlab"</title>
<link>http://www.mathroot.com/topic.php?id=6#post-8</link>
<pubDate>Sat, 28 Feb 2009 16:43:31 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">8@http://www.mathroot.com/</guid>
<description>&#60;p&#62;It is an easy matter to save data as a mat(MATLAB binary) file or an ASCII file so long as you know the filename beforehand. For ex: to save data in the variable datvar to a file mydata.dat, all you have to do is say&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;
save mydata.dat datvar
&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;However if you want to dynamically generate your filename, things get a little tricky since MATLAB's documentation is sparse about this. Here's how:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;
% Create a filename (myfile.001) using sprintf
fOut = sprintf('myfile.%03d',i);   % say, i=1

% save data as an ASCII file
save(fOut, 'datvar', '-ascii');

% Or, create a mat file - (myfile001.mat)
% since MATLAB binary files typically have the extension .mat
fOut = sprintf('myfile%03d.mat',i);   % say, i=1

% save data as matlab binary
save(fOut, 'datvar');
&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If you have multiple columns of data, just ensure that datvar is an array. Remember that the .mat file will retain the name of the variable datvar but the ASCII file will only contain data.
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "HOWTO: Creating movies with Matlab"</title>
<link>http://www.mathroot.com/topic.php?id=5#post-7</link>
<pubDate>Sat, 28 Feb 2009 16:41:46 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">7@http://www.mathroot.com/</guid>
<description>&#60;p&#62;If you want to show how your plots change with time, a movie is a good idea. Especially since MATLAB can produce movies that can be embedded in your presentations, or be seen with any good ol' movie player. Here's how:&#60;/p&#62;
&#60;p&#62;The idea is to create plot figures and compile them as frames of your movie.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;% Create a new figure, and position it
    fig1 = figure;
    winsize = get(fig1,&#38;#39;Position&#38;#39;);
    winsize(1:2) = [0 0];
% Create movie file with required parameters
    fps= 25;
    outfile = sprintf(&#38;#39;%s&#38;#39;,outFileName)
    mov = avifile(outfile,&#38;#39;fps&#38;#39;,fps,&#38;#39;quality&#38;#39;,100);
% Ensure each frame is of the same size
    set(fig1,&#38;#39;NextPlot&#38;#39;,&#38;#39;replacechildren&#38;#39;);
    for i=1:numframes
        plot(x,y); % generate your plot
% put this plot in a movieframe
% In case plot title and axes area are needed
%       F = getframe(fig1,winsize);
% For clean plot without title and axes
        F = getframe;
        mov = addframe(mov,F);
     end
% save movie
    mov = close(mov);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Voila! (Make sure that you do not open any window over your plot window while MATLAB is compiling your movie, else those windows will become part of your movie)
&#60;/p&#62;</description>
</item>
<item>
<title>Anil on "HOWTO: Creating XML output with Matlab"</title>
<link>http://www.mathroot.com/topic.php?id=4#post-6</link>
<pubDate>Sat, 28 Feb 2009 16:39:34 +0000</pubDate>
<dc:creator>Anil</dc:creator>
<guid isPermaLink="false">6@http://www.mathroot.com/</guid>
<description>&#60;p&#62;If you want to format your data output as an XML file, here's how to do it without doing any complicated string handling. MATLAB can use the XML handling capabilities of Java very easily. Here's how:&#60;/p&#62;
&#60;p&#62;    Assume that your data is available in arrays arrData1 and arrData2. Create an XML document node, say Node1 as follows:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;docNode = com.mathworks.xml.XMLUtils.createDocument(&#38;#39;Node1&#38;#39;);
docRootNode = docNode.getDocumentElement;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now put the data in the data nodes..&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;for i=1:length(arrData1),
% create nodes..
    elPar = docNode.createElement(&#38;#39;DataParent&#38;#39;);
    elData1 = docNode.createElement(&#38;#39;Data1&#38;#39;);
    elData2 = docNode.createElement(&#38;#39;Data2&#38;#39;);

% put data in nodes..
    elData1.appendChild(...
    docNode.createTextNode(sprintf(&#38;#39;%f&#38;#39;, arrData1(i))));
    elData2.appendChild(...
    docNode.createTextNode(sprintf(&#38;#39;%f&#38;#39;, arrData2(i))));

% put nodes in the correct positions..
    elParent.appendChild(elData1);
    elParent.appendChild(elData2);
    docRootNode.appendChild(elParent);
end&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now save the XML document. You can save it directly, or use uiputfile to get the standard save dialog of the OS.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[filename, pathname] = uiputfile(...
sprintf(&#38;#39;%s.xml&#38;#39;, datFile), &#38;#39;Save XML file as&#38;#39;);

% Save the XML document.
% xmlFileName = [dataOutFile,&#38;#39;.xml&#38;#39;];
    xmlFileName = fullfile(pathname, filename);
    xmlwrite(xmlFileName,docNode);
% open xml file to see your output
    edit(xmlFileName);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;To see more ways of using XML with MATLAB, refer to Java's documentation and play around to see what works.
&#60;/p&#62;</description>
</item>
<item>
<title>admin on "Introduction"</title>
<link>http://www.mathroot.com/topic.php?id=2#post-2</link>
<pubDate>Sat, 28 Feb 2009 16:27:29 +0000</pubDate>
<dc:creator>admin</dc:creator>
<guid isPermaLink="false">2@http://www.mathroot.com/</guid>
<description>&#60;p&#62;Over the course of my research and work I have accumulated a fair share of MATLAB hacks where I have used MATLAB to accomplish tasks that go beyond the usual equation-solving and numerical-simulations routines. Mostly I have been motivated by my own laziness and reluctance to code everything in C, or to use a combination of tools, but as I have discovered along the way, MATLAB is truly a very powerful tool and allows you to accomplish complicated stuff using very simple commands. &#60;/p&#62;
&#60;p&#62;This used to be a blog on &#60;a href=&#34;http://www.ecogito.net/matlab&#34; rel=&#34;nofollow&#34;&#62;www.ecogito.net/matlab&#60;/a&#62; but since folks were always asking questions using comments, I decided to create a forum for this kind of stuff. Enjoy!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
