matlab script to simulink model

1 回表示 (過去 30 日間)
zahid fazal
zahid fazal 2020 年 12 月 12 日
回答済み: Divyanshu 2024 年 7 月 30 日
I know that, by user defined function we can creat a simulink block for my m-code..But i am unable to plot my m-code plots by using scope bloks of simulink. HOW to do it??
  1 件のコメント
Kenneth
Kenneth 2024 年 7 月 29 日
I believe you could use plot() functions in simulink function blocks, which should generate plots when run.

サインインしてコメントする。

回答 (1 件)

Divyanshu
Divyanshu 2024 年 7 月 30 日
Hi Zahid,
If you want to visualize plots of your m-code on scope block than you can use MATLAB-Function block.
Instead of using plot() function inside the m-script file you can use the script for computation and return the results as output which can be passed to scope block.
You can refer the following documentation link for more details on 'MATLAB Function' block:

カテゴリ

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