help-octave
[Top][All Lists]
Advanced

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

Re: Error in script file, but not in CLI


From: John W. Eaton
Subject: Re: Error in script file, but not in CLI
Date: Thu, 25 Feb 2010 16:14:49 -0500

On 25-Feb-2010, Leo Butler wrote:

| On Thu, 25 Feb 2010, alaninva wrote:
| 
| < 
| < I use Octave 3.2.3_gcc-4.4.0 and notepad++.
| < 
| < I tried this code in a script file called ndcm.m
| < 
| < n = [25:25:50];
| < d = [5:5:15];
| < c = [0.1:0.1:0.4];
| < 
| < defining the matrix terms by using [...], (...), and "bare" numbers.  Each
| < time, I get the error " 'ndcm' undefined near line 1 column 1".  When I type
| < these same lines in all three formats at the Command Line Interpreter level,
| < there is no error.  Thinking that there might be some non-printing
| < characters at the file header, I typed in a new file and got the same 
error. 
| < Thinking that there might be a problem with my installation, I re-installed
| < Octave.  No change in behavior.
| < 
| < Any ideas?
|  
| Try
| 
| help source
| 
| and
| 
| source "ncdm.m"

You should be able to run commnds from a script file just by typing
the name of the script (without the .m suffix).  But for that to work,
the script must be in Octave's path.  Where are you saving the file
that you create with notepad?  What directories are in Octave's path?
To see a list, type

  path

at the Octave prompt.  You can change to the directory containing the
script with

  cd somedirectory

Does that help?

jwe


reply via email to

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