Umal-qura university


CASE 3: When Amplitudes and Phases of the sinusoids are the same but Frequencies are different



Yüklə 0,73 Mb.
səhifə23/30
tarix23.12.2023
ölçüsü0,73 Mb.
#156716
1   ...   19   20   21   22   23   24   25   26   ...   30
Signal and Systems Manual - v2full

CASE 3: When Amplitudes and Phases of the sinusoids are the same but Frequencies are different.

t=-2:0.01:2;
x1=cos(2*pi*0.5*t); x2=cos(2*pi*1*t); x3=x1+x2; subplot(3,1,1); plot(t,x1,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');

title('COS WAVE , AMPLITUDE = 1, FREQ = 0.5 HZ, Phase = 0 RADIAN');


subplot(3,1,2); plot(t,x2,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');
title('COS WAVE , AMPLITUDE = 1, FREQ = 1 HZ, Phase = 0 RADIAN');
subplot(3,1,3);
plot(t,x3,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');
title('SUM OF THE ABOVE TWO COSINE SIGNALS');





      1. CASE 4: When Amplitudes and Frequencies of the sinusoids are the same but Phases are different

t=-2:0.01:2;
x1=cos(2*pi*0.5*t); x2=cos((2*pi*0.5*t)+1); x3=x1+x2; subplot(3,1,1);
plot(t,x1,'linewidth',3); grid; ylabel('Amplitude');

xlabel('Time');


title('COS WAVE , AMPLITUDE = 1, FREQ = 0.5 HZ, Phase = 0 RADIAN');
subplot(3,1,2); plot(t,x2,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');
title('COS WAVE , AMPLITUDE = 1, FREQ = 0.5 HZ, Phase = 1 RADIAN');
subplot(3,1,3); plot(t,x3,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');
title('SUM OF THE ABOVE TWO COSINE SIGNALS');




-----------------------------------TASK 04------------------------------------


Write a general program that takes ‘n’ sinusoids from user of same frequency, amplitude, and phase. Plot the individual sinusoids & the resultant using subplot function on same figure. Do perform proper labeling. Note: Take the amplitude, frequency, and phase given in example of case 1. Run the code for different values of n and state the result on paper.


Lab # 7



Yüklə 0,73 Mb.

Dostları ilə paylaş:
1   ...   19   20   21   22   23   24   25   26   ...   30




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə