help-octave
[Top][All Lists]
Advanced

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

Re: piping to octave


From: Geordie McBain
Subject: Re: piping to octave
Date: Mon, 05 Feb 2007 13:03:00 +1100

On Sat, 2007-02-03 at 18:02 -0800, tr doug wrote:
> I'm very new to Octave and Linux(debian, X11, KDE).

Welcome.

>   I usually like to edit and run my scripts from an editor like nEdit
> or UltraEdit(when on windows).  I'm able to pipe my scripts into
> octave and have my editor then display the text(stdout) outcome.  The
> issue i can't seem to resolve is when I plot something, the gnuplot
> window process gets killed as soon as Octave quits.  Is there anyway
> to prevent the Octave from also closing the gnuplot window?
> 
> I've tried something like this, at command line, too and had the same
> result.
> 
> address@hidden:~$cat scriptfile | octave
> 
> Thanks

Try adding a pause at the end of the script; e.g. in a file trdoug.m:
---
x = linspace (0, 2*pi, 100);
plot (x, sin (x), ";sine;");
pause ();
---
then call it like
---
$ octave trdoug.m
---
The Gnuplot window will remain up until you hit ENTER in the shell.

Note that this doesn't work if you cat the script into Octave.

Attachment: trdoug.m
Description: Text Data


reply via email to

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