help-octave
[Top][All Lists]
Advanced

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

How to get Octave.app to work 2


From: Vic Norton
Subject: How to get Octave.app to work 2
Date: Tue, 4 Sep 2007 17:41:29 -0400

Well, thanks to Matthias Brennwald, I've pretty much solved the problem of being able to call the octave-2.9.13 in Octave.app from perl.

My previous confusion was a result of the fact that
   fopen("~/octave/tmp/test.txt", "wt")
works in octave-2.9.13 but not in octave-2.9.9. Apparently the fopen of 2.9.9 needs an explicit path.

To use the octave-2.9.13 in Octave.app from perl I simply needed to add the path
   /Applications/Octave.app/Contents/Resources/bin
to my PATH. Thus in ~/.bash_profile = ~/.bashrc I define
   PATH=/Applications/Octave.app/Contents/Resources/bin:$PATH
   PATH=~/bin:$PATH
   PATH=$PATH:/opt/local/bin
   PATH=$PATH:/usr/local/octave/bin
   export PATH
Then the perl line
   `octave "/Users/vic/octave/m/tests/test3.m"`;
executes test3.m with the octave-2.9.13 in Octave.app--provided you are not executing the perl code from an application like BBEdit.

The problem with BBEdit is that it doesn't pay any attention to ~/.bash_profile = ~/.bashrc. To rectify this I needed to add
   <plist version="1.0">
   <dict>
      ...
      <key>PATH</key>
<string>/Users/vic/bin:/Applications/Octave.app/Contents/ Resources/bin:/bin:...</string>
      ...
   </dict>
   </plist>
to ~/.MacOSX/environment.plist

Now everything works fine now--with exception. If I directly execute an octave file that begins with the shebang line
   #!/usr/local/bin/octave
the code will be executed by octave-2.9.9. I have not been able to figure out how to put a _working_ symbolic link of the octave-2.9.13 in Octave.app into the /usr/local/bin directory.

Regards,

Vic



reply via email to

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