findzero - y1 = -.4.*x1^2+7*x1+35; y2 = -.4.*x2^2+7*x2+35;...

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

View Full Document Right Arrow Icon
% 3/31/2011 % Topic: Recursive (iteration) % function out = findzero(x1,x2) if abs(x1-x2) < .0001 out = x1; else xmid = (x1+x2)/2; ymid = -4.*xmid^2+n*xmid+35;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y1 = -.4.*x1^2+7*x1+35; y2 = -.4.*x2^2+7*x2+35; if (ymid * y1) <= 0 out = findzero(x1, midx); else out = findzero(midx, x2);...
View Full Document

This note was uploaded on 05/01/2011 for the course HCSC 110 taught by Professor Amosjohnson during the Spring '11 term at Morehouse.

Ask a homework question - tutors are online