This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: clear Delta_t = 2e-5; num_pts = 51; mvalues = 0:1:(num_pts-1); t_secs = mvalues*Delta_t; t_final = (num_pts-1)*Delta_t; x = ones(1,num_pts); R = 1000; C = 159.16e-9; b = 1/(R*C); bdel = b*Delta_t; K1 = 1/(1+bdel); K2 = bdel/(1+bdel); xcoeffs = [ K2 ]; ycoeffs = [ 1 , -K1]; y = filter( xcoeffs, ycoeffs, x ); subplot(211), plot(t_secs,x, '*' ),grid xlabel( 't, sec.' ),ylabel( 'input, x(t)' ) axis([-0.00005 t_final 0 1.2 ]); title( 'Input' ) subplot(212),plot(t_secs ,y, '*' ),grid xlabel( 't, sec.' ),ylabel( 'output, y(t)' ) axis([-0.00005 t_final 0 1.2 ]); title( 'Simulation Output' )...
View Full Document
This note was uploaded on 01/28/2012 for the course ECE 301 taught by Professor Hoozturk during the Fall '08 term at N.C. State.
- Fall '08