フィルターのクリア

x(t) = Λ(t/4)[Π((​t+4)/6)+Π(​(t-4)/6)]+​Λ(t), t = [-10,10]

1 回表示 (過去 30 日間)
milton
milton 2020 年 11 月 6 日
コメント済み: milton 2020 年 11 月 11 日
Hi,
I am new in MatLab and I am having some trouble plotting the above x(t)using the rectpuls and i'm not sure where i am going wrong. By default the code must be like that:
step = 0.01;
t =
xt =
figure(1)
I tried the below code but something is wrong with the tripuls's arguments.[Ihave seen that it's form is tripuls(t,w,s), where w is the width where here is 0.25? and s is the skew, where here is ...?]. In the paper I have found that: Π((t+4)/6)+Π((t-4)/6) = Π(t/6+4/6)+Π(t/6-4/6) = Π(t/(2*3)) + Π(4/6) + Π(t/(2*3) - Π(4/6) =[ Π(4/6) = 0]=u(t+3) - u(t-3) - u(t+3) + u(t-3) = 0. So finally x(t) = Λ(t), but what about the code?
step = 0.01;
t = -10:step:10;
syms t
xt = tripuls(t,0,1)*((heaviside((t+4)/6)+heaviside((t-4)/6)))+ tripuls(t);
figure(1)
fplot(t,xt);
  4 件のコメント
Debasish Samal
Debasish Samal 2020 年 11 月 10 日
編集済み: Debasish Samal 2020 年 11 月 10 日
Hi,
The 'tripuls' function accepts input arguments of type 'single' or 'double' but it is 'symbolic' in this case. Can you try using these data types instead?
If you want to plot unit step function without 'Heaviside', an example can be found in the following MATLAB Answer:
-Debasish
milton
milton 2020 年 11 月 11 日
Thank you, Debasish Samal! It was really helpful the MATLAB Answer that you post!

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

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by