help-octave
[Top][All Lists]
Advanced

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

Re: how to plot from script in macbook pro


From: Ben Abbott
Subject: Re: how to plot from script in macbook pro
Date: Sat, 06 Apr 2013 08:41:31 -0400

On Apr 6, 2013, at 4:05 AM, address@hidden wrote:

> I am very much a beginner on octave on macbook pro. I can plot from the 
> command line on octave, but when i try to run from a script(which i have 
> saved to a text editor and saved with .m) and call on that script for e.g.;
> 
> ">>myscript " it says invalid use of script index expression. 
> 
> This is my code on the script ( i have even named the filename so that it 
> doesnt coincide with a function)
> 
> t=[0:.1:100];
> u=-1+0.02*t;
> y=sin(0.2*t);
> plot(t,y,t,u)
> %y (y-axis) is plotted against t (x-axis)
> %and u (y-axis) is plotted against t (x-axis).


I'd guess the script was created using TextEdit?  Likely *not* saved as a 
simple text file?

Try editing the file and save it with Unicode (UTF-8) plain text encoding.  Be 
the file name ends with ".m" and contains no additional periods.

Ben



reply via email to

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