[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automate print command on mac?
From: |
Ben Abbott |
Subject: |
Re: Automate print command on mac? |
Date: |
Tue, 22 Dec 2009 18:42:18 -0500 |
On Dec 22, 2009, at 11:38 AM, rs-232 wrote:
>
> Hi all, I need to automatically plot multiple separate arrays, and print them
> in a specific resolution. I can get octave to plot and print my arrays, but
> when I try to automate this by putting the process in a function and
> replacing the filename with an argument, octave saves the file as the
> argument name rather than its value and will overwrite the same file in
> subsequent iterations.
>
> Any ideas?
>
> I have included my incredibly basic function:
>
>
> function y = testr2( arg0 )
> start = 0
> finish = 44100
> y = wavread ("sound.wav", [start, finish]);
> plot (y)
> print -dpng "-S23215,500" arg0
> arg0
> y = 0
> endfunction
Using the print command as a function will resolve the problem.
print (gcf, "-dpng", "-S23215,500", arg0)
Ben