help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SAVE in loop


From: Steve C. Thompson
Subject: Re: SAVE in loop
Date: Thu, 19 Jan 2006 08:20:15 -0800
User-agent: Mutt/1.5.9i

Michal,

Have you tried fprintf?  For example,

  flist = ['cheb0306_pL1.xml'; ...
           'cheb0506_pL1.xml';...
           'cheb0511_pL1.xml'];

  for i = 1 : size (flist, 1)
    something_to_save = rand (2, 1);
    filename = flist (i, :);
    fid = fopen (filename, 'w');
    fprintf (fid, '%f %f \n', something_to_save);
    fclose (fid);
  end

Steve

On 19 Jan 06 09:43AM, Michal Seidl wrote:
> Hi,
> I can not figer out how to give to function "save"
> the name  of file that is stored in variable. This is
> my code, but it  does not work. Can anyone help?
>    
>     flist = [
>   'cheb0306_pL1.xml';...
>   'cheb0506_pL1.xml';...
>   'cheb0511_pL1.xml';...
>   ]
>    
>   for i=1:size(flist,1)
>        .....
>        save -text eval('flist(i,:)') X covX
>        .....
>   end



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]