help-octave
[Top][All Lists]
Advanced

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

Re: save


From: James Sherman Jr.
Subject: Re: save
Date: Mon, 11 Feb 2013 21:39:32 -0500

On Mon, Feb 11, 2013 at 5:19 PM, Drakonis Byrkit <address@hidden> wrote:
> I am trying to produce a function that will incrementally save information
> in a bunch of files without  having to manually rewrite the main file name
> several times. i.e. data1.m data2.m data3.m... and so on. do you have any
> suggestions?
> Aquaticmage
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>

Something like this should do the trick,

for ii = 1:10,
   filename = sprintf('data%d.m', ii);
   fid = fopen(filename, 'w');
   <save stuff>
   fclose(fid);
endfor

Hope this helps,

James Sherman


reply via email to

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