help-octave
[Top][All Lists]
Advanced

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

Re: Installation of 2.9.12 - readline problem?


From: Thomas Treichl
Subject: Re: Installation of 2.9.12 - readline problem?
Date: Tue, 10 Jul 2007 18:04:59 +0200
User-agent: Thunderbird 2.0.0.4 (Macintosh/20070604)

Vic Norton schrieb:
On Jul 10, 2007, at 2:48 AM, Thomas Treichl wrote:

Why are you using 2.9.9? You don't like octave.app that comes with 2.9.12?

Basically because I don't understand octave.app.

I am not doing a lot of Octave programming these days, but I use it constantly. I typically call Octave from a Perl script:

   ## Compute "Octave/Output/spdrPortf39T_shyB_26.csv"
   print "Computing Sharpe-optimal portfolios\n";
   `octave "$maindir/Octave/m/$octavescript"`;
   print "'Octave/Output/$octaveoutput' has been written\n";

I don't understand how octave.app would work in this connection.

Ok, forgive me that I don't understand anything about Perl. However I rewrote your example into something that shows that it works with octave.app:

  print "Computing Sharpe-optimal portfolios\n";
    `octave --eval "fid = fopen ('test.txt', 'w');
                    fprintf (fid, 'Hallo World, Perl calls Octave');
                    fclose (fid);"`;
  print "test.txt has been written\n";

and this is the result

  bash~$ perl ~/script && cat test.txt
  Computing Sharpe-optimal portfolios
  test.txt has been written
  Hallo World, Perl calls Octave

The simple trick is that you create a link of the form

sudo ln -s /usr/local/bin/octave <path of your octave.app>/Contents/Resources/bin/octave

so that octave is found from the command line (so be sure your /usr/local/bin path is set correctly in your $PATH environment). Things like this are explained in more detail in Readme.html of octave-2.9.12-xxx.dmg.

  Thomas




reply via email to

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