One half sine wave simulink

16 ビュー (過去 30 日間)
Pavel
Pavel 2015 年 8 月 15 日
回答済み: Mohammad Al Salti 2016 年 9 月 21 日
Hi. I'm trying to simulate using Simulink a quarter car model as it passes over a obstacle. My problem is that the obstacle has the shape of a single half sine wave as the one find in the attachment. How do I optain this in Simulink?
Thank you

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 8 月 15 日
Create a file filename.mat
A=1;
T=2*0.01;
f=1/T;
t=0:0.001:0.3;
idx=t<0.1 | t>0.11;
y=A*sin(2*pi*f*(t-0.1));
y(idx)=0;
yt=[t;y];
save filename yt
In simulink add a from file block with the name: filename
  1 件のコメント
Pavel
Pavel 2015 年 8 月 15 日
Thank you very much, sir!

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

その他の回答 (1 件)

Mohammad Al Salti
Mohammad Al Salti 2016 年 9 月 21 日
Hello, I also want to have this input but I didn't understand how to make the m-file and import it into simulink using from data file. Can you explain more please?

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by