conversion from simulation time to real time

6 ビュー (過去 30 日間)
cmcm
cmcm 2014 年 4 月 5 日
コメント済み: Azzi Abdelmalek 2014 年 4 月 5 日
hello ... i have a simulink program with fixed step size (0.001),, i run the program in time (0-300) ,, and when i want to plot my results, the "time axis" is the simulation time (not the real time) ... i.e. this 300 (simulation time) equal almost 1 minutes (in real word) ... how can i convert this 300 to 60 second to make the results in real time ?
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 5 日
You mean at the end of the simulation?

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

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 5 日
Look at this example
t=0:300
y=sin(0.1*t)
tn=60;
t_new=linspace(0,60,numel(t))
plot(t_new,y)
  9 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 5 日
編集済み: Azzi Abdelmalek 2014 年 4 月 5 日
If you have the toolbox, just read the help, it's easy to use
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 5 日
To use the external mode, you will need also, a Simulink coder

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

カテゴリ

Help Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by