MATLAB code is given below in bold letters.
clc;
close all;
clear all;
% define w
w = [0 pi/6 3*pi/2 1.9*pi/2];
% define n
n = 1 : 50;
% define x1 and x2 and compute y1 and y2 using for loop
for
% different values of w
for k = 1:length(w)
% define x1 and x2
x1 = sin(w(k)*n);
x2 = cos(w(k)*n);
% now compute y1 and y2
y1 = 0.5*([zeros(1,length(x1)+1) x1]+[fliplr(x1)
zeros(1,length(x1)+1)]);
y2 = 0.5*([zeros(1,length(x1)+1) x1]-[fliplr(x1)
zeros(1,length(x1)+1)]);
% now plot the signals
figure;
subplot(211);
stem(-max(n):max(n),y1,'fill'); grid on;
xlabel('n');ylabel('Amplitude');title(['y1[n] for w =
',num2str(w(k))]);
subplot(212);
stem(-max(n):max(n),y2,'fill'); grid on;
xlabel('n');ylabel('Amplitude');title(['y2[n] for w =
',num2str(w(k))]);
end
The plots are given below
![yi [n] for w = 0 0.5 -0.5ト 50 40 30 -20 -10 0 10 2030 40 50 y2[n] for w = 0 0.5 0.5 50 40 30 20 1010 20 30 0 50](http://img.homeworklib.com/images/3c74f619-7e06-49aa-bd3b-ec86eb0d638b.png?x-oss-process=image/resize,w_560)
![y1In] for w 0.5236 0.5 0.5 50 40 30 20 1010 20 30 40 50 y2[n] for w 0.5236 0.5 -0.5 50 40 30 20 10 10 20 30 0 50](http://img.homeworklib.com/images/97c8854c-e8a0-4f20-b52b-5f11338eac44.png?x-oss-process=image/resize,w_560)
![y1[n] for w 4.7124 0.5 0.5* 50 40 32010 0 10 20 304 50 y2[n] for w4.7124 0.5 -0.5 50 40 30 20 10 0 10 20 30 50](http://img.homeworklib.com/images/af7e1846-d4e9-4fee-811f-19d5facdeb50.png?x-oss-process=image/resize,w_560)
![y1In] for w 2.9845 0.5 0.5 50 40 30 20 1010 20 30 40 50 y2[n] for w 2.9845 -0.5 50 40 30 20 1010 20 30 0 50](http://img.homeworklib.com/images/dce7f6d3-18c9-4e64-8aa9-246f3c515c9e.png?x-oss-process=image/resize,w_560)
from the above fiures it is observed that y1[n] is symmeric about y axis which means that y1[n] is an even part of the signal x1. likewise y2[n] is anti-symmeric about y axis which means that y2[n] is an odd part of the signal x1
Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6,...
Realize signal processing systems described by the difference equation: y1(n)=1/2 [x(n)+x(n-1)] and y2(n)=1/2 [x(n)-x(n-1)] using Matlab. Assuming same input signal x(n)=sin(ωn) for various values of ω ={0,/6, ,3/2, 1.9/2} applied to both systems find the following: Obtain stem plots of y1(n) and y2(n) in each case. (15 Marks) Critically analyze y1(n) and y2(n) in terms of type of filter, maximum gain and cut off frequency. (Hint : The system can be tested by computing frequency response of the system).
Question 2 (a) Determine whether the discrete time system which has an output y[n] 2*x[n] over the nterval 010 is linear or not by determining the response yi[n] to the input signalxj[n]- sin( (2*pi / 10 ) * n ) and the response y2[n] to the input signal x2[n] = cos( (2*pi/10 ) * n ). Determine the response y3[n] to the input signal x1n] = xi [n] + x2[n] and compare it with y4[n] = [n] + y2[n] ....
Solve the separable initial value problem. tan(sin(x^(2) 1. y' = 2x cos(x2)(1 + y2), y(0) = 5 → y= 2. v' = 8e4x(1 + y2), y(0) = 2 + y=
Matlab help
1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...
By
using matlab
Additional example using @ h(x) In(x) cos(x)x2 +1 (1+fo) +(fC))) sin) f (x) + If(x) 2 Calculate g(h,5) using subfunction (Nested and Sequential)
2 + COS- 2.ry dy d 1+y2 = y(y + sin x), 7(0) = 1. 3. [2cy cos(x+y) - sin x) dx + x2 cos (+²y) dy = 0. 4. Determine the values of the constants r and s such that (x,y) = x'y is an Integrating Factor for the following DE. (2y + 4x^y)dr + (4.6y +32)dy = 0. 2. C = -1 You need to find the solution in implicit form. 3. y = arcsin (C-cos) 4. r=...
5 pts D Question 1 A system has the following impulse response: .2 Sample number, n From the choices below, select the frequency response of this system. H (eju)-e(1.5 ) (2 sin( 1.5ώ) + 4 sin(0.δώ)) H (ee) = e-j(1.5e-5) (cos( 1.5 ) +2 cos(0.54)) @ H (ee)-e-n1.si) (sin( 1.54) t. 2 sin(0.δώ)) (sin(l.50) +4sin(0.0) H (ee)-e-j(1.5i) (2 cos( 1.5ώ) + 4 cos(0.5a)) H (efo)-e-n1.5u) (cos( 1.50) + 2 cos(0.50)) https://rmitinstructure.comcoursesy 5 pts DQuestion 2 A system has the following...
Need help converting the following code from Matlab into Python: N=2048; fs=4.9; t=0:1/fs:(N-1)/fs; fs1=200; t1=0:1/fs1:(N-1)/fs1; x2=0.5+0.6366.*cos(2.*pi.*t1)+0.1273.*cos(10.*pi.*t1)-0.0909.*cos(14.*pi.*t1); x=0.5+0.6366.*cos(2.*pi.*t)+0.1273.*cos(10.*pi.*t)-0.0909.*cos(14.*pi.*t); X=fftshift(fft(x)); f=linspace(-fs/2,fs/2,N); plot(f,abs(X)./N); xlabel('f'); ylabel('|F(f)|'); title('magnitude spectrum of sampled signal'); x1=ifft(fftshift(X)); figure plot(t(1:100),x1(1:100)); xlabel('t'); ylabel('f(t)'); title('f(t) obtained by inverse transform'); figure plot(t1(1:1000),x2(1:1000)); xlabel('t'); ylabel('f(t)'); title('original f(t)');
1) (35 points) The wave function for a particle moving along x axis between the limits 0 and L is: (x)-C sin (nx xL) where n are 1, 2, 3, A) Determine the normalization constant C B) Why can't n take the value of 0, briefly explain C) For n-3 determine the values of x (in terms of L) that correspond to a maximum or a minimum in the wave function D) For n-3 determine the values of x (in...
FR2 (4+4+4 12 points) (a) Let XI, X2, X10 be a randoin sample from N(μι,σ?) and Yi, Y2, 10 , Y 15 be a random sample from N (μ2, σ2), where all parameters are unknown. Sup- pose Σ 1 (Xi X 2 0 321 (Y-Y )2-100. obtain a 99% confidence interval for σ of having the form b, 0o) for some number b (No derivation needed). (b) 60 random points are selected from the unit interval (r:0 . We want...