prog4b_2533_sp11 - theta_right=grid_point stepsize...

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

View Full Document Right Arrow Icon
% CSC 2533 % Spring 2011 % Assignment 4b phi=18*pi/180; g=32.2; s=470; for(u=150:20:270) f=@(theta) 2*u^2*cos(phi+theta)*(sin(phi+theta)-cos(phi+theta)*tan(phi))/ . .. (g*cos(phi))-s; stepsize=1*pi/180; for(grid_point=0:stepsize:90*pi/180) theta_left=grid_point;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: theta_right=grid_point+stepsize; f_left=f(theta_left); f_right=f(theta_right); if(f_left*f_right<0) guess=(theta_left+theta_right)/2; theta=fzero(f,guess); fprintf('u=%d theta=%8.5f\n',u,theta*180/pi); end end fprintf('\n'); end...
View Full Document

This note was uploaded on 04/01/2011 for the course CSC 2533 taught by Professor Brener,n during the Spring '08 term at LSU.

Ask a homework question - tutors are online