作者BBelfi (缘起不灭)
看板PHP
标题[请益] PHP call matlab的回传值
时间Mon Dec 3 00:59:42 2012
不好意思想要请问一下
我用exec去呼叫matlab function,如下
<?php
$num1=1;
$num2=2;
$command = "matlab -nojvm -nodesktop -nodisplay -r\
"test('$num1','$num2');exit\"" ;
$a=exec ( $command );
echo $a;
?>
我这样写一直没有办法显示出$a的答案,也可能是呼叫的方法错了...
所以想要请问一下要怎麽在PHP当中取得matlab的回传值?
/*
matlab function 如下
function output = test( input1, input2 )
output=input1+input2;
end
*/
谢谢大家!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 111.242.14.243
※ 编辑: BBelfi 来自: 114.35.165.133 (12/03 01:27)
※ 编辑: BBelfi 来自: 111.242.8.192 (12/05 01:35)