help-octave
[Top][All Lists]
Advanced

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

Re: Octave and PHP


From: Gerard Choinka
Subject: Re: Octave and PHP
Date: Fri, 25 Jul 2008 06:37:15 -0700 (PDT)


Christopher Back wrote:
> If someone could provide a layout of how to implement Octave or
> point me in the direction of a good example I would really appreciate it.
> thanks.

in php
start "octave -q script" with popen

create a string in php e.g. "input_data = [102 10 10 10 10 10];"

write this string to the pipe

in octave

recive the string with fread on stdin
let the eval function do the job
calculate

print the result with printf in php syntax "$result = array(12,10,9,12,)"

php
read the output from the pipe (with php fread)
use phps eval function


but using eval with octave and php is a security risk, to avid eval parse
the matrix wird scanf

this is also not the fastes way to use octave (the octave startup needs a
lot of time)






-- 
View this message in context: 
http://www.nabble.com/Octave-and-PHP-tp18639959p18651908.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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