Hi Victor,
Just like in Matlab, you need to tell Octave where to expect to find
M-files. Explore these tidbits:
LOADPATH:
http://www.octave.org/doc/octave_12.html#SEC95
Also, check out the 'path' function. Watch this:
octave> path
LOADPATH contains the following directories:
~/code//
octave> path(path,"/usr/share/octave-2.1.50/")
ans = ::~/code//:/usr/share/octave-2.1.50/
octave> path
LOADPATH contains the following directories:
~/code//
/usr/share/octave-2.1.50/
octave>
See how I 'added', or extended the path by typing the seemingly
recursive statement, path(path,"/new/path/to/add") ?
My sixth sense tells me that you're using a Windows OS without
Cygwin. That's a good one; who here knows where this guy could put a
".octaverc" file in plain-vanilla Windows, on order to automagically
load his LOADPATH variable?
Hope this helps!
Cheers, & good luck with your project,
~Tomer
On Oct 28, 2003 at 7:16pm, Victor Kareem wrote:
slickv >Date: Tue, 28 Oct 2003 19:16:20 -0600
slickv >From: Victor Kareem <address@hidden>
slickv >To: address@hidden
slickv >Subject: How to write and run .mfiles in octave
slickv >Resent-Date: Tue, 28 Oct 2003 22:33:30 -0600
slickv >Resent-From: address@hidden
slickv >Resent-To: help-octave <address@hidden>
slickv >
slickv >I am a student at the University of Alabama at Birmingham. I am working on a
slickv >senior design project using octave. I am building a series of virtual labs
slickv >that deals with different types of signal processing for communication
slickv >systems. I wrote a simple mfile just like you would in matlab. I try to run
slickv >the mfile on octave but i have no luck. this is the way i wrote the mfile
slickv >
slickv >a =[1,2,3]
slickv >b=[4,5,6]
slickv >y=conv(a,b)
slickv >plot(y)
slickv >
slickv >I saved the mfile as test1.m in the same directory where my octave
slickv >2.1.36.exe is located. I opened octave and type test1 <enter>. Well nothing
slickv >showed. But if i type the above command line by line on the octave screen,
slickv >it works fine. Can someone tell or show an example on how to write and run
slickv >.mfiles
slickv >in octave. It seems am doing it wrong. All inputs are highly appreciated.
slickv >Thanks
slickv >
slickv >_________________________________________________________________
slickv >Fretting that your Hotmail account may expire because you forgot to sign in
slickv >enough? Get Hotmail Extra Storage today!
slickv >http://join.msn.com/?PAGE=features/es
slickv >
slickv >
slickv >
slickv >-------------------------------------------------------------
slickv >Octave is freely available under the terms of the GNU GPL.
slickv >
slickv >Octave's home on the web: http://www.octave.org
slickv >How to fund new projects: http://www.octave.org/funding.html
slickv >Subscription information: http://www.octave.org/archive.html
slickv >-------------------------------------------------------------
slickv >
slickv >
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------