shell - Why octave figure closed very soon in emacs -


i use gnu emacs 24.3.1 on ubuntu 14.04 , have simple octave script it's name test.m:

#! /usr/bin/octave -qf x=1:10 plot(x); 

when try execute m-! ./test.m, empty figure window appears closed , saw result in emacs:

warning: function ./test.m shadows core library function x=  1 2 3 4 5 6 7 8 9 10 

how can solve problem?

the warning that: function file test.m shadows built in function test long don't want call built in test function can ignore (although it's considered bad practice shadow core functions).

the plot disapears because octave exits after running test.m. have call octave --persist or it's common add pause @ end of script waits keypress:

#! /usr/bin/octave -qf x=1:10 plot(x); pause 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -