What am i doing wrong in this code
显示 更早的评论

i am ploting these graphs in matab ...............i have written the equations as given in the book but the plots are not coming as they are shown in the book .............am i doing any thing wrong.............the attached file is the output of my code on matlab
clear all
clc
t=[0 1 2]
x=[1 1 0]
subplot(5,1,1)
plot(t,x)
xlabel('time axis')
ylabel('amplitude')
title(' x(t)')
grid on
axis([-2 5 0 2])
x1=(t+1)
subplot(5,1,2)
plot(x1,x)
xlabel('time axis')
ylabel('amplitude')
title(' x(t+1)')
grid on
axis([-2 5 0 2])
x2=(-t+1)
subplot(5,1,3)
plot(x2,x)
xlabel('time axis')
ylabel('amplitude')
title(' x(-t+1)')
grid on
axis([-2 5 0 2])
xt=3*t
x3=(xt/2)
subplot(5,1,4)
plot(x3,x)
xlabel('time axis')
ylabel('amplitude')
title(' x(3*t)/2)')
grid on
axis([-2 5 0 2])
x4=x3+1
subplot(5,1,5)
plot(x4,x)
xlabel('time axis')
ylabel('amplitude')
title(' x((3*t)/2)+1)')
grid on
axis([-2 5 0 2])
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!