|
From: | Doug Stewart |
Subject: | Re: function help |
Date: | Thu, 23 Feb 2012 10:10:08 -0500 |
I have had no success with finding why the following doesn't work. I have tried many examples in Octave's Help and they don't work either.
Why is it that if you type each line into the command line then the following works:
function total=addr(x,y)
total=x+y;
endfunction
add(5,4)
>ans=9
but if i put the above lines into a m-file then the interpreter spits out x undefined etc.
This happens for all the functions i have found in the LSODE examples etc. If you type them one by one at the command line it works but not in a script file. What am i missing ???
regards
Tom
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |