HW2_sol - figure(2 subplot(321 plot(t,vC title'Q5...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Q4. Plot I L C .
Background image of page 6
clear;clc; step = 0.001; t1 = [0:step:1]'; t2 = [1+step:step:3]'; wn = sqrt(3)/2; iL1 = exp(-.5*t1)/wn.*sin(wn*t1); iL2 = zeros(size(t2)); figure(1) subplot(321) plot([t1;t2],[iL1;iL2]) title( 'Q4' ) xlabel( 'time(sec)' ) ylabel( 'current(A)' ) grid vC1 = 1/wn*exp(-.5*t1).*(-.5*sin(wn*t1)-wn*cos(wn*t1))+1; vC2 = ones(size(t2))*vC1(end); subplot(323) plot([t1;t2],[vC1;vC2]) title( 'Q4' ) xlabel( 'time(sec)' ) ylabel( 'voltage(V)' ) grid
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Q5. Plot V C L .
Background image of page 9

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

View Full DocumentRight Arrow Icon
Plot energy stored in the inductor and capacitor.
Background image of page 10
clear;clc; t = [0:0.001:10]'; wn = sqrt(3)/2; vC = exp(-.5*t)/wn.*sin(wn*t);
Background image of page 11

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

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

Unformatted text preview: figure(2) subplot(321) plot(t,vC) title( 'Q5' ) xlabel( 'time(sec)' ) ylabel( 'voltage(V)' ) grid iL = 1/wn*exp(-.5*t).*(-.5*sin(wn*t)-wn*cos(wn*t))+1; subplot(323) plot(t,iL) title( 'Q5' ) xlabel( 'time(sec)' ) ylabel( 'current(A)' ) grid WC = .5*vC.^2; figure(3) subplot(321) plot(t,WC) title( 'Q5' ) xlabel( 'time(sec)' ) ylabel( 'energy stored in the capacitor(J)' ) grid WL = .5*iL.^2; figure(3) subplot(323) plot(t,WL) title( 'Q5' ) xlabel( 'time(sec)' ) ylabel( 'energy stored in the inductor(J)' ) grid...
View Full Document

This note was uploaded on 11/21/2010 for the course MECHANICAL mae302 taught by Professor Jang during the Spring '10 term at Seoul National.

Page1 / 12

HW2_sol - figure(2 subplot(321 plot(t,vC title'Q5...

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

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