bandpass

bandpass - %dB = 20*log10(magnitude) or...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%script to plot transfer functions necessary for Project 5 %matlab commands can be separated by ; or new line %the ; suppresses a listing of the result of the command % %correct component values must be input here r1 = 1e4; r2 = 1e5; c1 = 0.75e-9; c2 = 5e-9; % %first set up the frequency vector from 10Hz to 1 MHz f = logspace(1,6); w = f*2*pi; %then calculate the complex transfer functions hlp=1./(1+j*w*r1*c1); hhp=j*w*r2*c2./(1+j*w*r2*c2); %plot magnitude of transfer function on linear ordinate, log abscissa figure semilogx(f,abs(hlp),'b') hold on semilogx(f,abs(hhp),'r') semilogx(f,abs(hhp.*hlp),'k') grid title('Put Your Names and the Date Here') ylabel('Magnitude of Transfer Function') xlabel('Frequency (Hz)') % %plot magnitude of transfer function on log (dB) ordinate
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %dB = 20*log10(magnitude) or 10*log10(magnitude^2) figure semilogx(f,20*log10(abs(hlp)),'b') hold on semilogx(f,20*log10(abs(hhp)),'r') semilogx(f,20*log10(abs(hhp.*hlp)),'k') grid title('Put Your Names and the Date Here') ylabel('Magnitude of Transfer Function (dB)') xlabel('Frequency (Hz)') % %now calculate the transfer function of the two circuits together %it will have the form shown below %you will have to find the term marked ????, put in the correct value %and remove the % (comment indicator) from the first column %then you'll need to copy the plotting statements from a previous plot % %hboth = j*w*r2*c2./((1 + j*w*r2*c2).*(1 + j*w*r1*c1) + ????); %...
View Full Document

This note was uploaded on 04/15/2010 for the course ECE ece35 taught by Professor Xiejiang during the Winter '10 term at UCSD.

Ask a homework question - tutors are online