{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW 4 Solution

# HW 4 Solution - ff = xf^2*abs(sin(xf-4...

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6.11

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
SI a) >> format long >> x0=0.5; %Initial Guess >> x = fzero(@(x)x^2*abs(sin(x))-4,x0) x = 3.478508515574645 b) %False Position Mehtod clear all clc x0 = 0; %initial Guess xf=4; % Final Guess error = 1;
i=0 while (error > (5*10^(-7))) i=i+1 f0 = x0^2*abs(sin(x0))-4;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ff = xf^2*abs(sin(xf))-4; if (f0*ff&amp;lt;0) x2 = x0-f0*(xf-x0)/(ff-f0); %Secant Part end f_x2 = x2^2*abs(sin(x2))-4 if (f0*f_x2&amp;lt;0) xf=x2; end if (f_x2*ff&amp;lt;0) x0=x2; end error = abs(f_x2); end...
View Full Document

{[ snackBarMessage ]}

### Page1 / 7

HW 4 Solution - ff = xf^2*abs(sin(xf-4...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online