help-octave
[Top][All Lists]
Advanced

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

Re: How to open script in Octave


From: James Sherman Jr.
Subject: Re: How to open script in Octave
Date: Sun, 6 Apr 2014 13:07:48 -0400

On Sun, Apr 6, 2014 at 4:04 AM, Alexandra Sachkova <address@hidden> wrote:
Hi! I have a problem.
I have to open  script in Octave. I have read intstructions and I type the
name of the script in the command like this:
octave-3.2.4.exe:1> XRF_Maps
XRF_Maps.m is a name of a script. Is it in the write directionary?
but it can`t open it. The program writes, that
error: "XRF_Maps" undefined near line 1 column 1
 What could be a problem?



--
View this message in context: http://octave.1599824.n4.nabble.com/How-to-open-script-in-Octave-tp4663513.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave

Hi Alexandra,

I think I should clarify something first.  Are you trying to *run* the script?  (i.e. have the script do whatever it is its supposed to do) Or are you trying to *open* it to edit or view the script?  If you're looking open the script to edit it, there is no editor built into octave, so just use whatever your favorite text editor is for that.

However, It looks like like you're trying to run this script.  So the first thing you should do is make sure that your current directory is the same as that of the script (well there are other ways, but this is the simplest).  Say your script is in the directory ~/scripts/  Then you'd just need to type at the octave prompt:

octave> cd ~/scripts/

To check to make sure you're in the right directory, you can type "pwd" (without the quotes) to see the name of the directory or "ls" to list the files and folders in that directory.  Then you can type your script filename just like you did (without the .m) and your script should run.

As an aside, octave-3.2 is quite old (about 5 years now), and you may run into bugs that have been fixed and such.  If possible I'd suggest installing a newer version which can be found here: https://www.gnu.org/software/octave/download.html

Hope this helps,

James Sherman


reply via email to

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