フィルターのクリア

m-file function as Simulink block

1 回表示 (過去 30 日間)
Parvathi
Parvathi 2011 年 7 月 16 日
hi
I have created a function as .m file. Can somebody help me as in i need to build a Simulink block with this function. Some of the input parameters to this function are matrices (2D) and i have used Matlab expressions like 'pinv' in the m-file.Embedded block wouldnt work since pinv is not a c code.and Matlab fn block required 1D inputs! Help me pls. Thankyou

回答 (1 件)

Rick Rosson
Rick Rosson 2011 年 7 月 16 日
In your external MATLAB function, include the following line of code just after the function header:
eml.extrinsic('pinv');
Then, in Simulink, use the "Embedded MATLAB Function Block" (R2010b or earlier), and call your external MATLAB function from within the Embedded MATLAB function block.
HTH.

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by