看板 PHP 關於我們 聯絡資訊
不好意思想要請問一下 我用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)