Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Assignment 1 on False Regula Method of the problem in exercise 5.24. Write a code in MATLAB for the False position method or use

MATLAB Assignment 1 on False Regula Method of the problem in exercise 5.24. Write a code in MATLAB for the False position method or use the algorithm in 5.15.

Use es = 0.005 as stopping criteria. Show the output in a table.

please solve me the problems in simple way that I can understand , because I searched online and found solutions but did not understand them

so please do not copy and paste from web

image text in transcribed

image text in transcribed

5.24 Develop a subprogram for the false-position method that min- imizes function evaluations in a fashion similar to Fig. 5.11. Deter- mine the number of function evaluations (n) per total iterations. Test the program by duplicating Example 5.6. FIGURE 5.15 Pseudocode for the modified false position method FUNCTION ModFalsePos(xl. xu, es, imax, xr, iter, ea) iter = 0 fl = f(x1) fu = f(xu) DO xrold = xr x = X - fu * (xl - x) / (f7 - fu) fr = f(xr) iter = iter + 1 IF xr 0 THEN ea = Abs(xr-xrold) / xr) * 100 END IF test = fl* fr IF test 0 THEN x1 = xr f] = f(x1) il = 0 iu = iu + 1 IF U 2 THEN fu = fu / 2 ELSE ea = 0 END IF IF ea imex THEN EXIT END DO ModFalsePos = xr End MODFALSEPOS 5.24 Develop a subprogram for the false-position method that min- imizes function evaluations in a fashion similar to Fig. 5.11. Deter- mine the number of function evaluations (n) per total iterations. Test the program by duplicating Example 5.6. FIGURE 5.15 Pseudocode for the modified false position method FUNCTION ModFalsePos(xl. xu, es, imax, xr, iter, ea) iter = 0 fl = f(x1) fu = f(xu) DO xrold = xr x = X - fu * (xl - x) / (f7 - fu) fr = f(xr) iter = iter + 1 IF xr 0 THEN ea = Abs(xr-xrold) / xr) * 100 END IF test = fl* fr IF test 0 THEN x1 = xr f] = f(x1) il = 0 iu = iu + 1 IF U 2 THEN fu = fu / 2 ELSE ea = 0 END IF IF ea imex THEN EXIT END DO ModFalsePos = xr End MODFALSEPOS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions