help-octave
[Top][All Lists]
Advanced

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

Re: plot() doesn't work from file


From: Martin Helm
Subject: Re: plot() doesn't work from file
Date: Sun, 25 Jul 2010 12:38:36 +0200
User-agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )

Am Sonntag, 25. Juli 2010 10:29:22 schrieb Renato:
> Hello, I'm very new to octave and I'm having a little problem with
> plot(). It works ok in interactive mode, but it fails (with no errors)
> if put in a file and executed by 'octave file.m'
> 
> for example if I run 'octave' and type 'plot(1)' I get a plot window,
> but if I write 'plot(1)' in a file and save it as file.m, 'octave
> file.m' doesn't do anything.
> 
> any idea on what the problem may be?
> 
> I'm on Archlinux and using Octave 3.2.4
> 
> regards
> renato
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> 
The reason for this is simply that the plot is shown but the script just ends 
and closes the plot (probably so fast that you did not see the window appear 
at all). Usually I add a pause statement at the end of the script (one has to 
press a key to stop octave, it does not close automatically).

For example

#!/usr/local/bin/octave -qi
plot(1:10)
pause


reply via email to

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