Depth_18 - y_new = y_old + dy_dt*dt; y(i,1) = y_new;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Problem 1.8 % A=1200; Q=500; t = (0:0.5:10)'; dt=0.5; y_new = 0; y npts = size(t,1); y = zeros(npts,1); y(1,1) = y_new; y for i = 2:npts f y_old = y_new; told = t(i-1,1); dy_dt = 3*(Q/A)*(sin(told))^2 - (Q/A);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y_new = y_old + dy_dt*dt; y(i,1) = y_new; dydt(i,1) = dy_dt; end table = [t, y, dydt] plot (t,y, '--rs')...
View Full Document

This note was uploaded on 09/21/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Ask a homework question - tutors are online