-------------------------TASK 01--------------------------
Generate the 1x10 row vector v whose i‐th component is cos (iπ/4).
-------------------------TASK 02--------------------------
Write matlab code that draw graphs of sin (nπx) on the interval ‐1≤x≤1 for n = 1, 2, 3, …, 8.
(Hint: Use for loop)
-------------------------TASK 03--------------------------
Given the signal exp(‐x)sin(8x) for 0≤x≤2π, plot its continuous‐time and discrete‐time
representations. Use subplot and label properly.
ADDITION OF SINUSOIDS
CASE 1: When Frequency, Phases, and amplitude of the sinusoids are same
clc ; clear all; close all;
t=-2:0.01:2;
x1=cos(2*pi*0.5*t); x2=cos(2*pi*0.5*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 = 0.5 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');
CASE 2: When Frequencies and Phases of the sinusoids are same but Amplitudes are different.
t=-2:0.01:2;
x1=2*cos(2*pi*0.5*t); x2=cos(2*pi*0.5*t); x3=x1+x2; subplot(3,1,1);
plot(t,x1,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');
title('COS WAVE , AMPLITUDE = 2, 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= 0 RADIAN');
subplot(3,1,3); plot(t,x3,'linewidth',3); grid; ylabel('Amplitude'); xlabel('Time');
title('SUM OF THE ABOVE TWO COSINE SIGNALS');
Dostları ilə paylaş: |