[請益] PHP call matlab的回傳值

看板PHP作者 (緣起不滅)時間13年前 (2012/12/03 00:59), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
不好意思想要請問一下 我用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)
文章代碼(AID): #1Gkua4fu (PHP)
文章代碼(AID): #1Gkua4fu (PHP)