|
From: | Xaero Chang |
Subject: | Re: Execute the same calculus to different data files |
Date: | Wed, 06 Aug 2008 00:03:26 +0800 |
User-agent: | Opera Mail/9.51 (Win32) |
Imagine that I have twenty new files (data files) called ff2, ff3,...ff20 external files with diferent matrix information I want to use.
I want to create a function (I know that this example is wrong) similar to this:for i=1:20 A(i)=load("ff(i).m") B(i)=A(i)+2 end
The following lines may do this: for i=1:20 filename=['ff',num2str(i),'.m']; A(i)=load(filename); end -- Best Regards! --------------------------- Sincerely Yours Chengqi Chang China Center for Economic Research Mail/MSN: address@hidden Personal Website: http://xaero.mmiyy.cn
[Prev in Thread] | Current Thread | [Next in Thread] |