[Top][All Lists]

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

Re: plot octave graph by running .m file problem

From: Carlo de Falco
Subject: Re: plot octave graph by running .m file problem
Date: Tue, 13 Oct 2015 09:08:02 +0200

Il 13/ott/2015 08:46, "Manpreet Dhiman" <address@hidden> ha scritto:
> Hello,
> I am plotting a graph in Octave. When I run commands on terminal. Then it
> plots graphs. But when I write code in .m file, Then my graph window appears
> for a second and disappear after that. How I can keep it appear?

How are you running your .m file?
Are you typing

octave myfile.m


octave --eval myfile

At the shell command prompt?
If so Octave will immediately quit after executing all commands in your file so your figure window will be closed.

To avoid this you can either add the --persist option on the command line which will cause Octave to remain running until you explicitly type 'exit' or you can use the 'sleep' command at the end of your .m file to have octave wait a fixed amount of time before the window is closed


reply via email to

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