If x1(n) = 5Sin(2πf1n) and x2(n) = 5Cos(2πf2n), then plot following signals in MATLAB and attach screen shots of code and result
(a) y1(n) = x1(n) + x2(n) (b) y2(n) = x1(n) – x2(n)
note: f1 = f2 = Last two digits of your Registration Number
Hint: If last two digits of your registration number are 00 then take first two digits of your registration
number as R (if last digits are say 05, then consider R = 5)
MATLAB CODE FOR y1(n)
x=linspace(0,2*pi,100);
y1=5*sin(10*pi*x)+5*cos(10*pi*x);
plot(x,y1)
OUTPUT SCREENSHOT:
(B)
MATLAB CODE FOR y2(n):
x=linspace(0,2*pi,100);
y2=5*sin(10*pi*x)-5*cos(10*pi*x);
plot(x,y2)
OUTPUT SCREENSHOT:
Comments
Leave a comment