Ask your own question, for FREE!
Mathematics 21 Online
OpenStudy (anonymous):

Hey guys I'm trying to take fourier transform of function and I'm unable to plot it in matlab..The function I want to plot is mirror Can anyone please help me !! close all; clear all; clc syms u x = -2:0.001:2; gauss = exp(-8.*x.^2); plot(x, gauss); rect = heaviside(x+0.5) - heaviside(x-0.5); mirror = rect.*gauss; figure(2); plot (x, mirror); figure(3); plot(x, rect);

OpenStudy (phi):

What is the problem ? I don't have the heaviside function, so I defined it as function yy= heaviside(x) yy= zeros(size(x)); yy(x>=0)= 1; and evaluated clear all; clc x = -2:0.001:2; gauss = exp(-8.*x.^2); figure(1); plot(x, gauss); title('Gaussian'); rect = heaviside(x+0.5) - heaviside(x-0.5); mirror = rect.*gauss; figure(2); plot (x, mirror);title('Mirror'); figure(3); plot(x, rect); title('Rectangle');

OpenStudy (anonymous):

Hi, Actually I just need the Fourier transform of the mirror function of my code...COuld you please help me ?

OpenStudy (phi):

clear all; clc dx= 0.001; Fs= 1/dx; x = -2:dx:2; N= floor(length(x)/2); T= 4; df= 1.0/T; frq= df*N; gauss = exp(-8.*x.^2); % 5 Hz sinusoid. Shows up at +5 Hz and -5 Hz %gauss= 0.5*sin(2*pi*5*x); %figure(1); plot(x, gauss); title('Gaussian'); rect = heaviside(x+0.5) - heaviside(x-0.5); mirror = rect.*gauss; %figure(2); plot (x, mirror);title('Mirror'); %figure(3); plot(x, rect); title('Rectangle'); MIRROR= fftshift(fft(mirror)); ff= -frq:df:frq; figure(4); plot(ff,20*log10(abs(MIRROR))); figure(5); plot(ff,20*log10(abs(MIRROR))); title('POWER SPECTRUM'); axis([ -15 15 0 60]); grid on; shg;

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!