Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

richard.mac

macrumors 603
Original poster
Feb 2, 2007
6,292
5
51.50024, -0.12662
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!
 

richard.mac

macrumors 603
Original poster
Feb 2, 2007
6,292
5
51.50024, -0.12662
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.
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
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

macrumors 603
Original poster
Feb 2, 2007
6,292
5
51.50024, -0.12662
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

macrumors 603
Original poster
Feb 2, 2007
6,292
5
51.50024, -0.12662
ok found this and "cd" (sorry :eek:) & "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 its only a 26 meg download and try and cd to your USB. thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.