Em350hw2 - 1 2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 A.1 Ryan Finke 1 MATLAB CODE em 350 HW 2 “spectrum function”

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 A.1 Ryan Finke 1) MATLAB CODE em 350 HW 2 “spectrum function” function [V] = spectrum1(f,fc,bw); A = sqrt(log(2))/(pi*bw); V = A*sqrt(pi)*(exp(-(4*pi^2*A^2*(f-fc)).^2)); “M-file – Plot one part” fc = 5; %MHz bw = 1; %MHz f = s_space(0,100,512); %MHz V = spectrum1(f,fc,bw); figure(1); plot(f, V) axis([0 10 0 0.5]) 1b) MATLAB CODE “M-file – Plot v(t) using IFourierT and compair”-3-2-1 1 2 3-1-0.8-0.6-0.4-0.2 0.2 0.4 0.6 0.8 1-3-2-1 1 2 3-1-0.8-0.6-0.4-0.2 0.2 0.4 0.6 0.8 1 dt=1/100; t = s_space(0, 512*dt, 512); v = IFourierT(V,dt); vshift = c_shift(v,256); x=s_space(-3,256*dt,512); vt = cos(2*pi*fc*x).*exp(-x.^2/(4*A^2)); plot(t_shift(t,256),vshift) plot(x,vt) Same 1c) MATLAB CODE 1 2 3 4 5 6 7 8 9 10-0.4-0.3-0.2-0.1 0.1 0.2 0.3 0.4 0.5 “M-file apply FourierT on IFourierT data 1(b)” Vf= FourierT(vshift,dt); plot(f,Vf) It is different because of the shift in the axis and putting the graph together with c_shift and t_shift. It created a negative amplitude....
View Full Document

This note was uploaded on 03/31/2008 for the course EM 350 taught by Professor Schnuerr during the Spring '08 term at Iowa State.

Page1 / 14

Em350hw2 - 1 2 3 4 5 6 7 8 9 10 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 A.1 Ryan Finke 1 MATLAB CODE em 350 HW 2 “spectrum function”

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online