Using MATLAB,
(a) Generate a pseudo-random sequence of 256 data points in a vector x, using the randn function which is built in to MATLAB.
(b) Find the DFT of that sequence of data and put it in a vector X.
(c) Set a vector Xlpf equal to X.
(d) Change all the values in Xlpf to zero except the first 8 points and the last 8 points.
(e) Take the real part of the inverse DFT of Xlpf and put it in a vector xlpf.
(f) Generate a set of 256 sample times t which begin with 0 and are uniformly separated by 1.
(g) Graph x and xlpf versus t on the same scale and compare. What kind of effect does this operation have on a set of data? Why is the output array called xlpf?
% Solution to exercise 45 in Sampling and the DFT
close all ;
x = randn(256,1) ; X = fft(x) ;
mask = [ones(8,1);zeros(240,1);ones(8,1)] ;
Xlpf = mask.*X ;
xlpf = real(ifft(Xlpf)) ;
t = [0:255]’ ;
p = xyplot({t,t},{x,xlpf},[0,256,-3,3],’\itt’,...
‘x({\itt}) and x_l_p_f({\itt})’,’Times’,18,...
‘Times’,14,”,’Times’,24,{’n’,’n’},{’c’,’c’},{’k’,’k’}) ;
set(p{1},’LineWidth’,0.5) ;
You might also like to view...
Technician A says brake-control valves are used to control the flow of fluid to the park brakes. Technician B says that failure of a brake circuit that has separate front and rear brake circuits still allows the operator to stop the equipment safely. Who is correct?
A. Technician A B. Technician B C. Both D. Neither
Rolling horizontal pipe is the easiest and fastest way of making horizontal pipe welds.
Answer the following statement true (T) or false (F)
Once the power has been connected to the condensing unit, it is a good idea to start the compressor immediately to make certain it runs.
Answer the following statement true (T) or false (F)
In which system does the service consultant and the customer work together through four stages?
A. Shop Production System B. Customer Satisfaction System C. Banking System D. Customer Service System