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

Regular False Position Method: Input Program & Result

The document discusses using the regular false position method to find the root of an equation. It provides the input values, describes the program and algorithm used, and displays the resulting root.

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)
20 views1 page

Regular False Position Method: Input Program & Result

The document discusses using the regular false position method to find the root of an equation. It provides the input values, describes the program and algorithm used, and displays the resulting root.

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

REGULAR FALSE POSITION METHOD

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

Name of the student :Shubham Chapparghare Roll No.:351013

INPUT
SC_FPM(@(x)exp(x)*cos(x)-1.2*sin(x)-0.5,0,1,0.0001)

PROGRAM & RESULT


function[]=SC_FPM(fun,x1,x2,acc)
y1=feval(fun,x1);
y2=feval(fun,x2);
while y1*y2>0
x1=input('Enter new value of x1:');
x2=input('Enter new value of x2:');
y1=feval(fun,x1);
y2=feval(fun,x2);
end
while abs(x2-x1)>acc
x0=(x1*y2-x2*y1)/(y2-y1);
y0=feval(fun,x0);
if y1*y0<0
x2=x0;
y2=y0;
else x1=x0;
y1=y0;
end
end
x0=(x1*y2-x2*y1)/(y2-y1);
fprintf('The root of given function is %f\n',x0);

The root of given function is 0.971001

Published with MATLAB® R2017a

You might also like