フィルターのクリア

How to write a discontinuous signal equation in matlab?

3 ビュー (過去 30 日間)
Tejas Nagotkar
Tejas Nagotkar 2022 年 10 月 12 日
コメント済み: Tejas Nagotkar 2022 年 10 月 12 日
x1=0.2*(sin(2*pi*150*t)) = 0.05<=t<=0.1
x2=0.4*(sin(2*pi*50*t)) = 0.15<=t<=0.25
x3=(sin(2*pi*10*t)) = 0<=t<=0.3
x=x1+x2+x3;
How to write equation in matlab so that i can get the following plots?

採用された回答

Davide Masiello
Davide Masiello 2022 年 10 月 12 日
編集済み: Davide Masiello 2022 年 10 月 12 日
t = 0:0.001:0.3;
x1 = 0.2*sin(2*pi*150*t); x1(t<=0.05 | t>=0.1) = 0;
x2 = 0.4*sin(2*pi*50*t); x2(t<=0.15 | t>=0.25) = 0;
x3 = sin(2*pi*10*t);
x = x1+x2+x3;
subplot(2,2,1)
plot(t,x1)
subplot(2,2,2)
plot(t,x2)
subplot(2,2,3)
plot(t,x3)
subplot(2,2,4)
plot(t,x)

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by