How to send Simulink variable to matlab?
4 ビュー (過去 30 日間)
古いコメントを表示
How to send simulink variable to matlab?
I have a variable like a sine wave which is generated in simulink using signal generator.
This signal has to be plot in matlab using "plot ".
I have used "to workspace " in simulink to send it to matlab workspace.
After this ,how can I use this signal (time series) in plot ?
How to plot this?
I have written : plot(t, simout);
Is there any mistake I have made while using simout variable?
1 件のコメント
KaMATLAB
2021 年 2 月 3 日
click on the 'workspace block' change the Timeseries field to 'array'. Also it is better if you can name your variable for instance y instead of using 'simout'. Also just clik on the 'workspace block' and name your variable
回答 (2 件)
Timo Dietz
2021 年 2 月 3 日
編集済み: Timo Dietz
2021 年 2 月 3 日
Timeseries signals can be plotted directly: plot(simout) or separated by x and y: plot(simout.Time, simout.Data)
0 件のコメント
KaMATLAB
2021 年 2 月 3 日
click on the 'workspace block' change the Timeseries field to 'array'. Also it is better if you can name your variable for instance y instead of using 'simout'. Also just clik on the 'workspace block' and name your variable
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!