how to use embedded matlab function, or any related block to call a written program in simulink
1 次查看(过去 30 天)
显示 更早的评论
Hello I want to write some code i want to apply to the signal online on simulink, I tried to used embedded matlab function to do that but always got alot of errors even in some command like "figure" "hold on" and so on so my question how can I apply a written program in matlab on the incoming signal online on simulink? I need more examples about how to use embedded matlab function hence in matlab help I got only one simple example..
thanks
0 个评论
回答(1 个)
Kaustubha Govind
2013-5-17
You can use the Interpreted MATLAB Function block instead if you just need to apply a simple single-input/single-output function on the signal. However, if you'd like to continue using the (Embedded) MATLAB Function block, note that in general only functions supported for code-generation are allowed in this block since it always generates C code from the MATLAB code for faster execution. If you would still like to use functions like figure or hold in the block, you can declare them as extrinsic functions to avoid the errors.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!