{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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

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.

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

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern