[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running files from within octave
From: |
Ben Sapp |
Subject: |
Re: Running files from within octave |
Date: |
Fri, 07 Apr 2000 08:55:23 -0600 |
Martin Hicks wrote:
> How do I run files from within the octave interpreter.
>
> I have a file that does plotting, so if I run
>
> octave file.m
>
> it just flashes the graph to the screen but then when octave returns to
> the shell, the plots disappear. I can't seem to figure out how to simply
> invoke octave and then run this file.
I would suggest doing something like the following. Create a file that
makes the plot like so:
------------------------------------------------------
#!/usr/local/bin/octave -q
t = linspace(0,4*pi);
plot(t,cos(t));
pause
------------------------------------------------------
I called mine standalone_plot then type 'chmod +x standalone_plot' at
the shell. Then just execute it with ./standalone_plot. It will not go
away until you hit enter at the terminal. I do not think Windows has
this capability but all UNIX-Like OS's do.
I hope this helps.
--
Ben Sapp Los Alamos National Laboratory
email: <mailto:address@hidden> Phone: (505)667-3277
Fax: (505)665-7920 URL: http://www.neutrino.lanl.gov/
--
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------