3 Replies Latest reply: Aug 3, 2010 2:19 PM by mactomtom
mactomtom Level 1 Level 1 (0 points)
Hey folks,
I installed octave (numerical modeling software) and gnuplot on my macbook.

The installation octave was straight forward (it was simply a .dmg file). Once I have started the programme (go to application and double click the symbol) it automatically opens a terminal. Is it possible to create a command so that I can start it directly in the terminal, such as:

Moreover, I downloaded gnuplot and installed it manually in the terminal using following commands:

./configure --with-readline=builtin
sudo make install

I used online instructions to do so. However, I can start now "octave" and "gnuplot". Unfortunately, both programmes do not collaborate. I tried a simple plot:

x=1:1:10; y=sin(x); plot(x,y)

I receive following error message:

gnuplot> m??
line 0: invalid character ?

gnuplot> set terminal aqua enhanced title "Figure 1"
line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list

line 0: No terminal defined

gnuplot> plot "-" binary format='%float64' record=10 using ($1):($2) axes x1y1 title "" with lines linestyle 1 ;
line 0: use 'set term' to set terminal type first

Any suggestions for this problem. So far, I have only used matab and never gnuplot and octave. If somebody has a useful tutorial I might use it. Help is appreciated!!!

MacBook Pro, Mac OS X (10.6.4)
  • mactomtom Level 1 Level 1 (0 points)
    Hey chaps,
    partially, I could fix the bug...

    Once you have downloaded the octave.zip-file and unzipped it, there is in addition to the octave.dmg file also a directory called "extras" which does contain a gnuplot.dmg file... You can install both programmes easily without any command line (what a pity, I wanna learn to work in the shell...)

    Additionally, I downloaded aquaterm which allows to render gnoplot graphs.

    Still, I would like to create a shell command called "octave" so that I can start "octave" directly from the terminal (instead of going to programmes and double click the icon "octave"). How is this possible?

    Best wishes,
  • BobHarris Level 6 Level 6 (15,130 points)
    If octave is really a .app directory (like most double-clickable applications), then you can create an alias

    alias octave="open -a octave"

    in your .bash_profile (if you do not have a .bash_profile, create one using a text editor such as Smultron (a free GUI text editor), or from the command line using "nano .bash_profile"

    Stop and relaunch the Terminal application so the .bash_profile changes take effect.

    Then you should be able to launch octave by just entering the command, or if you want to specify a file you would use

    octave file.to.process.with.octave
  • mactomtom Level 1 Level 1 (0 points)
    thanks a lot