main - [answer(counter,2),err,fc] =...

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

View Full Document Right Arrow Icon
% Derek Rampal % % main % % % x^2(1 - cos x cosh x) - g sin x sinh x = 0 format long; f a1 = .1; b1 = 10; g = .1; counter = 0; answer = zeros(30,4); func = inline('x^2*(1-cos(x)*cosh(x))-g*sin(x)*sinh(x)','x','g'); f for x = g:.1:3 counter = counter + 1; answer(counter,1)=x; [apts,bpts] = brute(func,a1,b1,.1,3,x);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [answer(counter,2),err,fc] = bisect2(func,apts(1),bpts(1),1e-12,x); [answer(counter,3),err,fc] = bisect2(func,apts(2),bpts(2),1e-12,x); [answer(counter,4),err,fc] = bisect2(func,apts(3),bpts(3),1e-12,x); end; answer...
View Full Document

This note was uploaded on 09/19/2009 for the course MATH numerical taught by Professor Ford during the Spring '09 term at FAU.

Ask a homework question - tutors are online