g356x25 - original

# g356x25 - original - x =

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

Sheet1 Page 1 % %Gilat 356/25 %First, need to solve differential equation %Part(a) syms t x=dsolve('10*D2x + 3*Dx + 28*x=0','x(0)=.18','Dx(0)=0') x = 27/55550*exp(-3/20*t)*sin(1/20*1111^(1/2)*t)*1111^(1/2)+9/50*exp(-3/20*t)*cos(1/20*1111^(1/2)*t) v=diff(x,t) v = -252/27775*exp(-3/20*t)*sin(1/20*1111^(1/2)*t)*1111^(1/2) %MUST have both plots on same page,NOT same graph - use subplot() t=[0:0.1:20] x1=eval(vectorize(x)) v1=eval(vectorize(v)) subplot(2,1,1) plot(t,x1) xlabel('Time(s)') ylabel('Distance(m)') subplot(2,1,2) plot(t,v1) xlabel('Time(s)') ylabel('Velocity(m/s)') % %Part (b) syms t x=dsolve('10*D2x + 50*Dx + 28*x=0','x(0)=.18','Dx(0)=0')

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

View Full Document

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: x = (9/100+3/460*345^(1/2))*exp(1/10*(-25+345^(1/2))*t)+(-3/460*345^(1/2)+9/100)*exp(-1/10*(25+345^(1/2))*t) v=diff(x,t) v = (9/100+3/460*345^(1/2))*(-5/2+1/10*345^(1/2))*exp(1/10*(-25+345^(1/2))*t)+(-3/460*345^(1/2)+9/100)*(-5/2-1/10*345^(1/2))*e x %MUST have both plots on same page,NOT same graph - use subplot() t=[0:0.1:10] x1=eval(vectorize(x)) v1=eval(vectorize(v)) Sheet1 Page 2 subplot(2,1,1) plot(t,x1) xlabel('Time(s)') ylabel('Distance(m)') subplot(2,1,2) plot(t,v1) xlabel('Time(s)') ylabel('Velocity(m/s)') % echo off Sheet1 Page 3 *t) Sheet1 Page 4 diary off...
View Full Document

## This note was uploaded on 03/19/2011 for the course MATH 152 taught by Professor Teitler during the Spring '08 term at Texas A&M.

### Page1 / 4

g356x25 - original - x =

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

View Full Document
Ask a homework question - tutors are online