[Top][All Lists]

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

Re: Passing values

From: Mike Miller
Subject: Re: Passing values
Date: Sun, 12 May 2002 14:11:26 -0500 (CDT)

On Sun, 12 May 2002, sbt wrote:

> I want to pass variable values from a perl cgi script to an octave
> script in order to generate plots that my be dynamically created and
> viewed online.  I am using Octave 2.0.16.  Any advice on how to do this?

I have one imperfect answer and a similar question.

Imperfect answer:

Write the octave script so that it reads data from a file...
  load -force octave_values.txt
...and parses that data accordingly.  Write the file from the perl script.

Similar question:

In an octave script, can I use command-line arguments as in a shell
script.  Simple example (which does not work):

#!/usr/local/bin/octave -q
x = $1 ;

I would call the script 'squared' and I'd call it like this:

squared 7

It would return 49 to stdout.  The '$1' refers to the first argument on
the command line (following the command itself).  Obviously, I've tried
this and the $1 syntax doesn't work.

Does Octave support this sort of thing?

Thanks in advance.


Michael B. Miller, Ph.D.
Assistant Professor
Division of Epidemiology
University of Minnesota

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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