- new_system('ModelName') to create a simulink model
- open_system('ModelName') to open your model
- add_block('Simulink/Sources/step','ModelName/BlockName') % for example
- set_param to configure blocks
- use add_line to connect block
- sim('ModelName',options) to start simulation
- close_system, to close your simulink Model
how can we create simulink block using m file in matlab 2012a?
3 ビュー (過去 30 日間)
古いコメントを表示
i have created my m file in matlab is there any way to create a simulation block without using s function
0 件のコメント
回答 (2 件)
Azzi Abdelmalek
2012 年 8 月 25 日
you can use
2 件のコメント
Kaustubha Govind
2012 年 8 月 27 日
Azzi: I think Kanwal's question is about calling his MATLAB code from Simulink, not about constructing a model using MATLAB code.
Salim
2013 年 7 月 26 日
I think he misunderstood your question. You can use Matlab function block under User-defined functions.
Kaustubha Govind
2012 年 8 月 27 日
You can use the Interpreted MATLAB Function block if your function has one input and one output, and you don't intend to generate code from your model. Otherwise, you can try the (Embedded) MATLAB Function block. If you're not using the subset of functions supported for code-generation, you will need to declare those using coder.extrinsic.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!