help-octave
[Top][All Lists]
Advanced

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

load .m file have error, please help


From: Afsshl
Subject: load .m file have error, please help
Date: Sun, 20 Feb 2005 04:12:08 EST

  for save time to type, I save simple program in .m file, it has no wrong if I type in at octave's command line, but have a lot of mistake if I load that from saved .m file
 
in 2.1.64  cygwin xp, please help
eric
 
-------------------------------------------------------------------------------------
 
octave:1> load nl2.m
error: load: nl2.m: inconsistent number of columns near line 2
error: load: unable to extract matrix size from file `nl2.m'
octave:1> nl2.m
warning: function name `f' does not agree with function file name `/home/eric lin/nl2.m'
error: `x' undefined near line 1 column 25
error: evaluating binary operator `-' near line 1, column 24
error: evaluating binary operator `^' near line 1, column 30
error: evaluating binary operator `+' near line 1, column 32
error: evaluating binary operator `-' near line 1, column 39
error: evaluating assignment _expression_ near line 1, column 19
error: called from `nl2' in file `/home/eric lin/nl2.m'
octave:1>
 
------------------
$ cat nl2.m
function z=f(x)  z=[(12-x(1))^2+x(2)^2-15^2, (16+x(2))^2+x(1)^2-25^2];
   endfunction
 
-----------------
 

reply via email to

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