0% found this document useful (0 votes)
51 views1 page

Successive Approximation Method: Input Program & Result

The document describes a successive approximation method program that finds the root of a function. It provides an example input and shows the MATLAB code and output of the program running on the input function.

Uploaded by

YASH DOSHI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views1 page

Successive Approximation Method: Input Program & Result

The document describes a successive approximation method program that finds the root of a function. It provides an example input and shows the MATLAB code and output of the program running on the input function.

Uploaded by

YASH DOSHI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SUCCESSIVE

APPROXIMATION METHOD
Table of Contents
INPUT .............................................................................................................................. 1
PROGRAM & RESULT ...................................................................................................... 1

Name of the Student: Shubham Chapparghare Roll No:351013

INPUT
SC_SAM(@(x)(x^2+6)/8,@(x)x/4,0,0.0001)

PROGRAM & RESULT


function[]=SC_SAM(gun,dgun,x1,acc)
y=feval(dgun,x1);
while y>1
x1=input('Enter the value of x0:');
y=feval(dgun,x1);
end
x2=feval(gun,x1);
while abs(x2-x1)>acc
x1=x2;
x2=feval(gun,x1);
end
fprintf('The root is %f\n',x2);

The root is 0.837715

Published with MATLAB® 8.0

You might also like