Question: PLEASE USE MATLAB!!! Use bisection.m below function [xn,steps,error] = bisection(f,a,b,tol) %function returns an estimate for the root, xn, and requires %inputs of the function, g,

PLEASE USE MATLAB!!!

Use bisection.m below

function [xn,steps,error] = bisection(f,a,b,tol)

%function returns an estimate for the root, xn, and requires %inputs of the function, g, the interval endpoints, a and b, %the desired tolerance for the error, tol.

error=b-a; %initialize error steps=0; %initialize step counter while error>tol steps=steps+1; %increment counter xn=(a+b)/2; %calculate xn, the midpoint of a and b if f(a)==0 || f(b)==0 %check f(a) and f(b) disp('endpoint is root!') if f(a)==0 xn=a; else xn=b; end break %If f(a or b) = 0 then landed on root and stop iterati elseif f(xn)*f(a) 0 then root is between xn and b, and xn becomes new a end error=b-a; %calculate new error end

Record: 1. your starting interval [, ], and 2. how many iterations it took you to reach .

PLEASE USE MATLAB!!! Use bisection.m below function [xn,steps,error] = bisection(f,a,b,tol) %function returns

8. DeSantis, Gironi, and Marelli ("Vector-Liquid Equilibrium from a Hard-Sphere Equation of State," Industrial and Engineering Chemistry Fundamentals, 15, 182-189, 1976) derive a relationship for the compressibility factor of real gases of the form (1-y) related to the van der Waals volume correction factor. i 2 what is the value of y? 8. DeSantis, Gironi, and Marelli ("Vector-Liquid Equilibrium from a Hard-Sphere Equation of State," Industrial and Engineering Chemistry Fundamentals, 15, 182-189, 1976) derive a relationship for the compressibility factor of real gases of the form (1-y) related to the van der Waals volume correction factor. i 2 what is the value of y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!