[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 10:54:47 -0400 |
On Apr 6, 2013, at 10:11 AM, saurabh sakpal wrote:
> > Subject: Re: how to plot from script in macbook pro
> > From: address@hidden
> > Date: Sat, 6 Apr 2013 08:41:31 -0400
> > CC: address@hidden
> > To: address@hidden
> >
> > 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
> >
>
> Thanks but i did save my file as 'plain text' and ended it with a .m suffix
> too. is there another way?
>
> Thanks again
Please reply below and keep the help-list cc'd
Please copy-n-paste the entire error you get.
What does "type mscript.m" return. Again, please copy-n-paste everything.
Ben