How can plot integral for sin wave
3 ビュー (過去 30 日間)
古いコメントを表示
Iam plot integral for sin wave in simulink ,the form the signal positive and the amplitude from 0 to 2 ????
0 件のコメント
回答 (1 件)
Wayne King
2013 年 6 月 14 日
Use the integrator block. If you attached a sine wave block to an integrator block (in the Continuous library), you will get what you want. In MATLAB code, you will get
t = 0:0.01:(2*pi);
x = sin(t);
dt = t(2)-t(1);
y = cumsum(x.*dt);
plot(t,x); hold on;
plot(t,y,'r')
Or you can use the x above and put that in a "From Workspace block"
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で General Applications についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!