x(t) = Λ(t/4)[Π((t+4)/6)+Π((t-4)/6)]+Λ(t), t = [-10,10]
조회 수: 1 (최근 30일)
이전 댓글 표시
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
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!