フィルターのクリア

Hi ,please help , I need to plot signals u(t-3),u (t+1), z(-t-3),,z​(2t+2),u(-​2n-1) and u(3n+2) using subplot and add title ,grid and axis labels

7 ビュー (過去 30 日間)
nickey
nickey 2013 年 4 月 23 日
Its about plotting signals in matlab using subplot.

回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 4 月 23 日
subplot(1,6,1);
plot(u(t-3));
grid on
ylabel('u(t-3)')
subplot(1,6,2);
plot(u(t+1));
grid on
ylabel('u(t+1)');
subplot(1,6,3);
plot(z(-t-3));
grid on
ylabel('z(-t-3)');
and so on.
  4 件のコメント
Image Analyst
Image Analyst 2013 年 4 月 24 日
t and n should be arrays defining your x axis elements, like
t = 3 : 1 : 100; % or whatever.
I don't know of any integer n that will allow you to get integer index numbers for both -2*n-1 and 3*n+2, so I don't see how u can be a list of values of u.
Walter Roberson
Walter Roberson 2013 年 4 月 24 日
... that would allow you to get positive index numbers ...
But perhaps u and z are functions instead of arrays.

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


nickey
nickey 2013 年 4 月 28 日
編集済み: Walter Roberson 2013 年 4 月 28 日
t=[-4:0.2:4];
n=[-2:0.1:2];
subplot(3,2,1)
plot(t,heaviside(t-3))
grid on;
title('Time shifted signal')
xlabel('time(s)')
ylabel('volt(V)')
subplot(3,2,2)
plot(t,heaviside(t+1))
grid on;
title('Time shifted signal')
xlabel('time(s)')
ylabel('volt(V)')
subplot(3,2,3)
plot(t,dirac(-t-3))
grid on;
title('Time shifted and reflected signal')
xlabel('time(s)')
ylabel('volt(V)')
At the end this is my code. I hope it will be ok.
Thanks for all comments.
Best regards.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by