help-octave
[Top][All Lists]
Advanced

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

Re: How to output to a new file after each iteration?


From: Mike Miller
Subject: Re: How to output to a new file after each iteration?
Date: Thu, 19 Apr 2012 09:32:24 -0400

On Thu, Apr 19, 2012 at 9:22 AM, c. <address@hidden> wrote:
>
> On 19 Apr 2012, at 11:43, nat0489 wrote:
>
>> title(['filename_' num2str(i) '_moreinfo']);
>> print(['filename_num2str(i)_moreinfo', '-dpdf']); %more info is extra bits I 
>> need in the file name
>
> you should use the same syntax as for setting the title:
>
> print(['filename_' num2str(i) '_moreinfo', '-dpdf']); %more info is extra 
> bits I need in the file name

Or just build the string once and reuse it:

plotname = ['filename_' num2str(i) '_moreinfo'];
title(plotname)
print(plotname, '-dpdf')

-- 
mike


reply via email to

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