help-octave
[Top][All Lists]
Advanced

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

Octave's EDITOR variable


From: Przemek Klosowski
Subject: Octave's EDITOR variable
Date: Fri, 09 Dec 2011 11:01:34 -0500
User-agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 12/09/2011 04:04 AM, Taza wrote:
http://octave.1599824.n4.nabble.com/file/n4175847/Asset_Paths_Simulation_errors.jpg
HI

Am trying to use octave to simulate an asset paths, however when i wrote my
code and saved it in the script as an m-file, on running it at the octave
prompt, it indicates parse error line 18 of file /home/user/AssetPaths.m,
and more other parse&  syntax errors as shown in the inserted image , to
make it even more problem, when i try to access the editor via command
prompt (edit AssetPaths.m) to start trying to correct errors, its not
possible since it still indicates the parse error and syntax error issues.
how can i go about to solve this problem to run my code successfully.

The 'edit()' function calls the editor defined by the Octave variable EDITOR, and your error messages look like you have it empty or set to the shell or octave itself. Try running Octave with EDITOR environment variable pre-defined to your favorite editor:

EDITOR=nedit octave

and type the 'edit AssetPaths.m' on the Octave command line.

In principle, it should work to set the EDITOR within Octave, but when I do:

EDITOR('vi')
edit AssetPaths.m

Octave still runs the original editor, not 'vi' even though Octave's EDITOR variable is correctly changed to 'vi'.


By the way, you write that your script contains this line:

> plot(time,S,'Linewidth',2);

but the error message reports error in the line reported as

plot(time,S,); % a graph of asset price S against time

so the file /home/user/AssetPaths.m does not contain what you think it contains.


reply via email to

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