Question

(MATLAB) In the same figure plot 7 vertically arranged DT sinusoids x k (m)=cos*2*pi*m/N, m=0,1,...6, using...

(MATLAB) In the same figure plot 7 vertically arranged DT sinusoids x k (m)=cos*2*pi*m/N, m=0,1,...6, using the function subplot(7,1,p).
0 0
Add a comment Improve this question Transcribed image text
Answer #1


1st simple  program :

clc;
close all;
clear;
N=7;
m=0:6;
xk=cos(2*pi*(m/N))
figure ;
plot(m,xk);
xlabel('m values');
ylabel('xk values');

output values:
xk =

1.0000 0.6235 -0.2225 -0.9010 -0.9010 -0.2225 0.6235

0.8 0.6 0.4 0.2 -0.2 -0.4 H -0.6 F 0.8 F m valuesconsidering m values 0,0to1,1to2,2to3,3 to4,4to5,5to6 with incremnt 0.1

clc;
close all;
clear;
N=7;
m=0;
xk1=cos(2*pi*(m/N))
figure (1);
plot(m,xk1)
subplot(7,1,1);
xlabel('m values');
ylabel('xk1 values');
m=0:0.1:1;
xk2=cos(2*pi*(m/N))
plot(m,xk2)
subplot(7,1,2);
xlabel('m values');
ylabel('xk2 values')
m=1:0.1:2;
xk3=cos(2*pi*(m/N))
plot(m,xk3)
subplot(7,1,3);
xlabel('m values');
ylabel('xk3 values');
m=2:0.1:3;
xk4=cos(2*pi*(m/N))
plot(m,xk4)
subplot(7,1,4);
xlabel('m values');
ylabel('xk4 values');
m=3:0.1:4;
xk5=cos(2*pi*(m/N))
plot(m,xk4)
subplot(7,1,5);
xlabel('m values');
ylabel('xk5 values');
m=4:0.1:5;
xk6=cos(2*pi*(m/N))
plot(m,xk6)
subplot(7,1,6);
xlabel('m values');
ylabel('xk6 values');
m=5:0.1:6;
xk7=cos(2*pi*(m/N))
plot(m,xk7)
subplot(7,1,7);
xlabel('m values');
ylabel('xk7 values');

outputs:

xk1 =

1


xk2 =

1.0000 0.9960 0.9839 0.9640 0.9362 0.9010 0.8584 0.8090 0.7531 0.6911 0.6235


xk3 =

0.6235 0.5509 0.4739 0.3930 0.3090 0.2225 0.1342 0.0449 -0.0449 -0.1342 -0.2225


xk4 =

-0.2225 -0.3090 -0.3930 -0.4739 -0.5509 -0.6235 -0.6911 -0.7531 -0.8090 -0.8584 -0.9010


xk5 =

-0.9010 -0.9362 -0.9640 -0.9839 -0.9960 -1.0000 -0.9960 -0.9839 -0.9640 -0.9362 -0.9010


xk6 =

-0.9010 -0.8584 -0.8090 -0.7531 -0.6911 -0.6235 -0.5509 -0.4739 -0.3930 -0.3090 -0.2225


xk7 =

-0.2225 -0.1342 -0.0449 0.0449 0.1342 0.2225 0.3090 0.3930 0.4739 0.5509 0.6235

03 02 04- 0.2 02- -05- 29 28 26 24 23 2 . T -05- 4 F 44 43 42 69 6 6.4 35 63 6: 8 2

please check 2nd program all output last values compare to 1st program output values

they must be equal

Add a comment
Know the answer?
Add Answer to:
(MATLAB) In the same figure plot 7 vertically arranged DT sinusoids x k (m)=cos*2*pi*m/N, m=0,1,...6, using...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT