Question: Plot the signal spectrum using MATLAB when the conditions are as follows. Problem 1 : Arbitrary signal () is an arbitrary function in the frequency
Plot the signal spectrum using MATLAB when the conditions are as follows. Problem 1 : Arbitrary signal () is an arbitrary function in the frequency domain. Set the amplitude, phase and bandwidth arbitrarily.
1) Plot after setting the sampling number of G(f) to 256 in the frequency domain.
2) Plot a function Gz() that zero-padded the signal G(f) by 128 left and right.
Problem 2 : When the FFT function of () used in Problem 1 is (), plot the spectrum of the function that satisfies the following conditions. (N = 512)
1) Draw the spectrum of the function g1[] (=1128) generated by transforming the sampling interval Ts of gz() to 4Ts. (Observe the aliasing phenomenon)
2) Draw the spectrum of the function g2[] (=1256) generated by transforming the sampling interval Ts of gz() to 2Ts.
3) Plot the spectrum by zero-padding 128 left and right at g2[m]
--------------------------------------------------------------------------------------------------------------------------------
Reference code
%% Create discrete signal % create x[n]=0.4cos(0.7n) n=1:0.01:100; %time vector figure(1); plot(n,0.4*cos(0.7*pi*n)); %signal generation xlabel('time'); ylabel('amplitude'); title('0.4cos(0.7n) graph');
%% convolution % Find the convolution of the input signal x[n] and the LTI system h[n] a=[0 0 1 1 1 1 1 0 0]; b=[0 0 2 2 2 2 2 0 0]; %signal generation convolution=conv(a,b); %convolution m=length(convolution)-1; n=0:1:m; figure(2) plot(n,convolution); xlabel('time'); ylabel('amplitude'); title('convolution graph');
%% FFT %Fourier transform after signal generation
Fs= 100; % sampling frequency Ts=1/Fs; %sampling time T=100; %length of time t=linspace(0,T,T/Ts); %time vector
x=0.4*cos(2*pi*30*t); %signal generation f=linspace(-Fs/2,Fs/2,length(t)); %frequency vector fft_x=fftshift(fft(x)); %FFT abs_fft_x=abs(fft_x); figure(3) plot(f,abs_fft_x); title('FFT') xlabel('frequency'); ylabel('magnitude');
-------------------------------------------------------------------------------------------------
please help me as far as you can :)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
