This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: v0 = .000832; % choose slope of beam at x = 0; [x,z] = ode45( 'beamfunc' , xspan, [y0 v0]); y = z(:,1); % the deflection of the beam v0(1) = 0; % first guess for slope of beam at x = 0; v0(2) = .002; v1(1) = 0; v2(2)=.002 error(1) = y(length(x)); % the error obtained from the first guess. max_it = 10; tol = 0.000001; i = 1; while (i<max_it)&(abs(error(i))>tol) i = i+1; [x,z] = ode45( 'beamfunc' , xspan, [0 0 v0(i) v1(i)]); y = z(:,3); b = z(:,4); error(i) = y(length(x)); v0(i+1) = v0(i)((v0(i)v0(i1))*error(i))/(error(i)error(i1)); v1(i+1) = v1(i)((v1(i)v1(i1))*error(i))/(error(i)error(i1)); % new guess from Secant method end format long , v0 format long , v1 error(i) plot(x,z) title( 'Greg Gangluff' ) xlabel( 'Position' ) ylabel( 'Deflection' )...
View
Full Document
 Fall '08
 Unknown
 Derivative, Greg Gangluff, graph K=4 b=, v1 error, Final vO value, function dz= beamfunc

Click to edit the document details