help-octave
[Top][All Lists]
Advanced

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

Re: mfile


From: Noersomadi
Subject: Re: mfile
Date: Wed, 14 Sep 2011 18:59:27 -0700 (PDT)

Dear friend,
 
I guess you must change your "Present Work Directory (PWD)" in octave to which you saved your mfile.
The PWD (as the default) of octave under windows is "C:\Octave\3.2.4_gcc-4.4.0\bin" (I use octave3.2.4).
For example, I make this program and save it as 'sinusgraph.m' in "D:\octavework".
 
x = -2*pi:.1:2*pi;
y = sin(x);
plot(x,y)
 
To run my program, first I must change the octave directory by typing:
 
> cd D:\octavework
> pwd
ans = D:\octavework
 
Then, I just type the name of myprogram without ".m"
 
> sinusgraph
 
And the sinusoidal curve will be shown.
 
Actually, you can also define your directory in "pathdef" by using "addpath" function.
So, you don't have to change into specified directory.
 
 
Noersomadi
From: "address@hidden" <address@hidden>
To: Noersomadi <address@hidden>
Sent: Wednesday, September 14, 2011 11:37 AM
Subject: Re: mfile

I don't know what you mean by script but maybe you are asking for the one I wrote in my Scite window,I would have something as simple as:
>A=[1 2; 3 4]
and let's say I save as 'matrix' then to my octave command window and input command
> matrix
Then it gives me the error message I told you about.
Sent from my BlackBerry® wireless device
From: Noersomadi <address@hidden>
Date: Tue, 13 Sep 2011 18:30:55 -0700 (PDT)
To: address@hidden<address@hidden>
ReplyTo: Noersomadi <address@hidden>
Subject: Re: mfile

Dear friend,
 
Could you show to us your script ?
 
Thank you, 
Noersomadi
(Indonesia)
From: "address@hidden" <address@hidden>
To: address@hidden
Sent: Wednesday, September 14, 2011 4:47 AM
Subject: mfile

I am using octave 3.2.4 and I have been trying to create mfiles for my assignments for a while now.
Every time I go to the scite window and create an mfile, save it and go back to the octave window to call it. It gives me an error message ' undefined near line 2 column 1'. I have tried everything thinking I was wrong, I even tried the examples in my book from school which can't be wrong and it still does the same thing.... Please I need your help as soon as possible.
Sent from my BlackBerry® wireless device
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave





reply via email to

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