How to run simulink and m-file simulataneouly?
1 回表示 (過去 30 日間)
古いコメントを表示
I have been trying to get data from simulink and use it in m-file but since the size of the simulink output is 1000001x1 i am not able to process the data effectively. So,is there a way to prpocess the data from simulink during simulation it self like an online process. What are the procedures or functions to be used?
0 件のコメント
採用された回答
Sebastian Castro
2017 年 4 月 11 日
Looks like it would be easier to process the data in Simulink by calling the MATLAB code from the model.
The typical way of doing this is by taking your existing function and calling it in a MATLAB Function block ( See example ).
Note that if your MATLAB file does things that are not supported for code generation, like plotting, user input, certain functions, you will have to either change your code or tell Simulink to run it using the MATLAB interpreter ( See documentation ). This is fine so long as you're staying within MATLAB/Simulink and do not need to generate code from your model.
- Sebastian
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!