View Full Version : Octave (MATLAB alternative which loads in Terminal)
richard.mac
Apr 3, 2008, 09:03 PM
does anyone know the command to change Octave's working directory? atm its set to ~/ by default but i want to set it to my USB specifically /Volumes/FLASH DRIVE/uni/Sc Comp 1/.
at uni i can change the directory to my USB in MATLAB quite easily but until i buy MATLAB for Unix i need to find out this command. thanks!
twoodcc
Apr 3, 2008, 09:52 PM
sorry that i can't help. i've taken a matlab course, and i've never heard of Octave. i might try it out
richard.mac
Apr 3, 2008, 10:02 PM
sorry that i can't help. i've taken a matlab course, and i've never heard of Octave. i might try it out
its OK. M-files open natively in XCode. the thing i hate is not having a command history and variable values in the sidebar and not knowing how to change the working directory.
kpua
Apr 3, 2008, 10:03 PM
uh... cd?
mduser63
Apr 3, 2008, 10:29 PM
its OK. M-files open natively in XCode.
That's because XCode thinks they're Objective-C source code files, which have the same .m extension. As for changing the working directory, in Matlab (and UNIX in general), it's:
cd /Volumes/FLASH DRIVE/uni/Sc Comp 1/
"cd" is short for "Change Directory". Never used Octave myself though, so I'm not sure really...
richard.mac
Apr 3, 2008, 10:39 PM
uh... cd?
uh... no? doesnt work says no file or directory.
That's because XCode thinks they're Objective-C source code files, which have the same .m extension. As for changing the working directory, in Matlab (and UNIX in general), it's:
cd /Volumes/FLASH DRIVE/uni/Sc Comp 1/
"cd" is short for "Change Directory". Never used Octave myself though, so I'm not sure really...
ive never tried "cd" in MATLAB i always use the directory drop down menu. as above it didnt work i even tried dragging the uni folder into Octave.
also it would be "/Volumes/FLASH\ DRIVE/uni/Sc\ Comp\ 1" wouldnt it?
richard.mac
Apr 3, 2008, 10:57 PM
ok found this (http://www.network-theory.co.uk/docs/octave/octave_164.html) and "cd" (sorry :o) & "chdir" work. i tried "cd /".
but i cant change the directory to my USB!? says no file or directory and i tried backslashes for spaces and without.
need to go to uni now so ill be offline for a while. get octave here (hhttp://sourceforge.net/project/showfiles.php?group_id=2888&package_id=237839) its only a 26 meg download and try and cd to your USB. thanks!
richard.mac
Apr 4, 2008, 12:10 PM
i ended up buying MATLAB at my uni book store. thanks anyways guys.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.