calculate the variance account

i am new to matllab, below is the given code, i tried to run it but i think i am missing something
t= 0:0.001:3;
xref = sin(2*pi*t).*cos(2*pi*t);
xs1 = 0.5*sin(2*pi*t).*cos(2*pi*t);
xs2 = 1.0*sin(2*pi*t).*cos(2*pi*t);
xs3 = 1.0*sin(2*pi*t).*cos(2*pi*t)+0.1*sin(2*pi*10*t);

2 Comments

Not really clear what the problem is. Do you want to regenerate the plot?
t= [0:0.001:3]'; % changed to column vector.
xref = sin(2*pi*t).*cos(2*pi*t);
xs1 = 0.5*sin(2*pi*t).*cos(2*pi*t);
xs2 = 1.0*sin(2*pi*t).*cos(2*pi*t);
xs3 = 1.0*sin(2*pi*t).*cos(2*pi*t)+0.1*sin(2*pi*10*t);
subplot(3,1,1);
plot(t,[xref, xs1])
subplot(3,1,2);
plot(t,[xref, xs2])
subplot(3,1,3);
plot(t,[xref, xs3])
figure;
subplot(3,1,1);
plot(t,[xref; xs1])
subplot(3,1,2);
plot(t,[xref; xs2])
subplot(3,1,3);
plot(t,[xref; xs3])

Sign in to comment.

Answers (0)

Categories

Asked:

on 19 Apr 2019

Commented:

on 15 Sep 2020

Community Treasure Hunt

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

Start Hunting!