Lab B - % Tspecific, specific solution for given constants...

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

View Full Document Right Arrow Icon
EE_1 function [yt] = EE_1 % function finds the voltage across a capacitor over time % in a RC circuit % INPUTS: none % OUTOUTS: yt, the voltage (V) across the capacitor over time yt = dsolve('0.2*Dy + y = 10','y(0)=2'); ezplot(yt, [0,1]); EE_2 function [yt] = EE_2 % function finds the voltage across a capacitor over time % in a RC circuit % INPUTS: none % OUTOUTS: yt, the voltage (V) across the capacitor over time yt = dsolve('0.2*Dy + y = 10 * (2 - exp(-t)*sin(5*pi*t))','y(0)=2'); ezplot(yt, [0,5]); ChE_1 function [yt] = ChE_1 % function finds the concentration of salt over time % in a freash water tank % INPUTS: none % OUTOUTS: yt, the concentration of the salt over time yt = dsolve('Dy + 2*y/(10+2*t) = 4','y(0)=0'); ezplot(yt, [0,10]); HF_1 function [T, Tspecific, tToReach125] = HF_1 % function finds the temperature over time of an object % put in a liquid bath % INPUTS: none % OUTOUTS: T, the general solution for the temperature
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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % Tspecific, specific solution for given constants % tToReach125, the time (s) required to reach 125 degree F syms T0 Tb; T = dsolve('10*DT + T = Tb','T(0)=T0'); Tspecific = subs(T, {T0, Tb}, {50, 200}); tToReach125 = double(solve(Tspecific-125)); ezplot(Tspecific, [0,tToReach125]); % check if the final value is 125 ME_1 function [yt1, yt2] = ME_1 % function finds the displacement of a spring with % viscous damping % INPUTS: none % OUTOUTS: yt1, the displacement over time for the first % set of initial conditions % yt2, the displacement over time for the second % set of initial conditions yt1 = dsolve('3*D2y + 18*Dy + 102*y = 10','y(0)=0','Dy(0)=0'); ezplot(yt1, [0,2]); yt2 = dsolve('3*D2y + 18*Dy + 102*y = 10','y(0)=0','Dy(0)=10'); figure ezplot(yt2, [0,2]); % strut assembly in a car is a spring with viscous damping...
View Full Document

This note was uploaded on 03/30/2008 for the course CSE 131 taught by Professor Sticklen during the Spring '08 term at Michigan State University.

Page1 / 2

Lab B - % Tspecific, specific solution for given constants...

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

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