[問題] Embedded Matlab Function in Simulink已回收

看板MATLAB作者 (不理不理左衛門)時間16年前 (2009/10/30 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Hallo 各位前輩 不知道大家有沒有在simulink用Embedded matlab function 解聯立方程式的經驗 程式碼如下 function output = fcn(a,b) x=0;y=0; eml.extrinsic('num2str', 'solve'); x=num2str(x); y=num2str(y); [x,y]=solve('3*x + 4*y =5', '2*x+7*y=8'); double(x); output = x; 因為syms x, y 無法直接在simulink中使用 錯誤訊息如下: Command-duality is not supported. 所以我改用num2str 的方法 但出現新的錯誤 Embedded MATLAB Interface Error: Class of MATLAB expression 'num2str' is char; expected double. Block Embedded MATLAB Function 爬過很多文和google都沒有找到解決的方法 不知道有沒有人有類似的經驗可以分享 非常感謝! -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 129.13.72.197
文章代碼(AID): #1Awhc3-d (MATLAB)
文章代碼(AID): #1Awhc3-d (MATLAB)