{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

EM350 midterm Problem 3

# EM350 midterm Problem 3 - Problem 3 This problem involved...

This preview shows pages 1–2. Sign up to view the full content.

Problem 3 This problem involved creating a function called spectral_props that takes the input sample signal and time interval, and returns -6dB bandwidth center frequency and percentage the bandwidth is of the center frequency. My code goes through the data and finds the maximum point then interpolated from that point finding the half amplitudes to figure out the bandwidths. MATLAB CODE function [bw1, bw2, fc] = spectral_props(signal,dt); signal2=[signal,zeros(1,14000)]; signal2f= FourierT(signal2,dt); f2=s_space(0,1/dt,15000); b=.001; for j=1:length(signal2f) a(j)=real(signal2f(j)); if a(j) > b; b=a(j); max=j; end end c=b/2; for k=1:length(signal2f) z=max+k; if a(z)<0 break end end y=max-abs(max-z); inter_amp=a(y:z); inter_freq=f2(y:z); for x=1:length(inter_amp)-1 if point_increase=x; elseif point_decrease=x; end end f1=-((((inter_amp(point_increase+1)-c)*(inter_freq(point_increase+1)- inter_freq(point_increase)))/(inter_amp(point_increase+1)-

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

EM350 midterm Problem 3 - Problem 3 This problem involved...

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

View Full Document
Ask a homework question - tutors are online