Octave (MATLAB alternative which loads in Terminal)

Discussion in 'Mac Programming' started by richard.mac, Apr 3, 2008.

  1. macrumors 603

    richard.mac

    #1
    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!
     
  2. macrumors P6

    twoodcc

    #2
    sorry that i can't help. i've taken a matlab course, and i've never heard of Octave. i might try it out
     
  3. macrumors 603

    richard.mac

    #3
    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.
     
  4. macrumors 6502

    #4
    uh... cd?
     
  5. macrumors 68040

    mduser63

    #5
    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...
     
  6. macrumors 603

    richard.mac

    #6
    uh... no? doesnt work says no file or directory.

    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?
     
  7. macrumors 603

    richard.mac

    #7
    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!
     
  8. macrumors 603

    richard.mac

    #8
    i ended up buying MATLAB at my uni book store. thanks anyways guys.
     

Share This Page