|
From: | John Helly |
Subject: | Re: Newbie problem running *.m files on Octave 3.4.2 on Snow Leopard |
Date: | Sat, 30 Jul 2011 16:54:18 -1000 |
Hi Jordi. I agree with you. I think something is between me and octave. The contents of the terminal window that opens up has the following (i've added the red): =========================== Terminal Window ============================= Last login: Sat Jul 30 16:40:50 on ttys002 NeptuneStonesteps.local:~>exec '/Applications/Octave.app/Contents/Resources/bin/octave' GNU Octave, version 3.4.0 Copyright (C) 2011 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Octave was configured for "x86_64-apple-darwin10.7.3". Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Read http://www.octave.org/bugs.html to learn how to submit bug reports. For information about changes from previous versions, type `news'. octave-3.4.0:1> ====================================================================== It looks like octave is being invoke by the 'exec' command and not getting any arguments. When I look at the commands you suggested: NeptuneStonesteps.local:~/src/octave-3.4.2>octave NeptuneStonesteps.local:~/src/octave-3.4.2>which octave /Applications/Octave.app/Contents/MacOS/octave NeptuneStonesteps.local:~/src/octave-3.4.2>file $(which octave) /Applications/Octave.app/Contents/MacOS/octave: Mach-O universal binary with 2 architectures /Applications/Octave.app/Contents/MacOS/octave (for architecture i386): Mach-O executable i386 /Applications/Octave.app/Contents/MacOS/octave (for architecture ppc): Mach-O executable ppc NeptuneStonesteps.local:~/src/octave-3.4.2> everything looks good. This is why I wanted to compile my own version to test that in contrast but I can't get that to work either. The sample script can be run within the opened terminal window and it runs fine (makes plot, eg.). Frustrating. Cheers. -------------- John Helly, University of California, San Diego / San Diego Supercomputer Center / Scripps Institution of Oceanography / 760 840 8660 mobile / stonesteps7 (Skype) / stonesteps7 (iChat) / http://www.sdsc.edu/~hellyj On Jul 30, 2011, at 4:44 PM, Jordi Gutiérrez Hermoso wrote: 2011/7/30 John Helly <address@hidden>: Thanks again. I'm trying to run this sample code I found just to see how/if Octave works before giving it something more complex that already runs in Matlab. The documentation suggests that all that is necessary is to invoke Octave with a file as an argument and it will run the file and exit. What happens is that the bottom window pops up as you surmized; no files are created. I added 'pause' at the end of the file and it had no effect. Hm, this script is supposed to produce a graph indeed. It should also produce some output, because the author forgot to add a few semicolons. Your symptoms are strange, because (1) I can't see why the "octave" command should be opening new terminals (2) the code indeed is not getting executed at all, because you're not seeing the buggy output. You should at least be able to type "bike_example" in the interactive prompt and run this code. Here's my next guess: whoever compiled that Octave version was trying to be too helpful and actually made a shell script or binary that introduces an additional step to open a terminal with Octave running instead of just running Octave, presumably because Mac OS X users would not be familiar with a purely CLI application. So what exactly is getting executed when you type "octave"? Is it a shell script? A binary? Type "which octave" to at least see which file it's running, and type "file $(which octave)" to see what kind of file it is. It may be a symbolic link, in which case keep following that symbolic link until you figure out what is ultimately being run. If it is indeed a binary and not an overzealously helpful script, I'm at a loss. HTH, - Jordi G. H. |
[Prev in Thread] | Current Thread | [Next in Thread] |