check where is my error of command...

Status
Not open for further replies.

awanis

Junior Member level 1
Joined
Sep 15, 2009
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
malaysia
Activity points
1,387
can anybody cek my command matlab..
i want to plot X(t) signal..

ts= 0.0313
y=linspace(0,4*pi,200);
x1=6*sin(3*pi*ts);
figure(4);
plot(y,x1,'r')
hold on
x2=[5*cos(6*pi*ts)];
plot(y,x2,'g')
x3=[7*cos(8*pi*ts+(0.167*pi))];
plot(y,x3,'-')
hold off

the error is at plot(y,x1,'r')..
what should i do with the command..
 

your ts must be a vector such as
ts=0:0.0313/100:0.0313;

try this
 

its true the graph should be like this..


X(t) signal
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…