Clear Filters
Clear Filters

if anyone can answer for the Questions B1,A2 & A3 ? the questions are posted below in the code

2 views (last 30 days)
% B. Effect of a signal cut on the size of a leak
clear; clc;
fs=30; fx=3;
N0=100; % without leakage
t0=0:1/fs:(N0-1)/fs;
y0=sin(2*pi*t0*fx);
f0=fs*(0:length(y0)-1)/length(y0);
Y0=fft(y0);
N=91.99; % with leakage
t=0:1/fs:(N-1)/fs;
y=sin(2*pi*t*fx);
f=fs*(0:length(y)-1)/length(y);
Y=fft(y);
subplot(2,1,1); stem(f0,(2/N0)*abs(fft(y0)),'.');grid; legend('N_0=100','Location','north');
xlabel('f[Hz]');ylabel('Y0');
subplot(2,1,2); stem(f,(2/N)*abs(fft(y)),'.');grid;legend('N=?','Location','north');
xlabel('f[Hz]');ylabel('Y')
% B1. Find the value of N at which the maximum leakage occurs. N between [91.99]
% A2. Determine the frequency of the bin in the spectrum Y0, i.e. for N0 = 100.
% A3. Determine the frequency of the two largest fringes in the spectrum Y.
% for the case of a spectrum with maximum leakage.
%_____________________________________________________________________

Answers (0)

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!