[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to pass parameter from PHP to Octave?
From: |
deepus |
Subject: |
How to pass parameter from PHP to Octave? |
Date: |
Wed, 29 Jul 2015 05:41:07 -0700 (PDT) |
How to pass parameter from PHP to Octave
My PHP code is:* test.php*
/$a = 3;
$b = 4;
$cmd = "C:\Octave\Octave4\bin\octave-cli C:\wamp\www\dspace\sr.m $a $b";
$ex = exec($cmd, $op);
var_dump($ex);
var_dump($op); /
My Octave code:* sr.m*
/# how I retrieve the parameters a, b
sqrt(a^2 + b^2)/
I want to pass the variables $a and $b from the PHP code to Octave code. I
already define the variable in test.php and my problem is how to retrieve
the variable in octave code (sr.m).
In python we can retrieve the parameter as
/a = float(sys.argv[1])
b = float(sys.argv[2])/
Like that how can I retrieve the parameters in octave code. I think the
question is clear.
Please help me...
--
View this message in context:
http://octave.1599824.n4.nabble.com/How-to-pass-parameter-from-PHP-to-Octave-tp4671879.html
Sent from the Octave - General mailing list archive at Nabble.com.
- How to pass parameter from PHP to Octave?,
deepus <=