Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help us figure out how to code this problem in Matlab? Below is the bisection code which we need to use. We do

Can you help us figure out how to code this problem in Matlab?image text in transcribed Below is the bisection code which we need to use. We do not know how to create a function for this problem

function bisection(func,ab,tolx,tolfx)

%func is the nonlinear function %ab is the bracketing interval [a,b] %tolx is the tolerance for error in estimating error %tolfx is the tolerance for error in function value at solution

maxiters=50; %maximum number of iterations allowed

a=ab(1); b=ab(2); fa=feval(func,a); %evaluate function at a fb=feval(func,b); %evaluate function at b

fprintf(' # root f(x) ');

for i=1:maxiters x=(a+b)/2; fx=feval(func,x); fprintf('%3d %7.6f %7.6f ', i,x,fx); if (abs(fx)

3. Saturation of oxygen in water concentration that is dependent upon the temperature of water. The saturation concentration of dissolved oxygen in water can be calculated using the following empirical equation Oxygen can dissolve in water up to a saturation 1.575701105 6.642308107 1.2438001010 In Sow =-139.3441 1 + 8.62 1949 1011 where sow-the saturation concentration of dissolved oxygen in water at 1 atm (mg/l) and Ta = absolute temperature (K). Remember that Ta = T + 273.15. where Te -temperature (C). According to this equation, saturation decreases with increasing temperature. For typical water samples near ambient temperature, this equation can be used to determine oxygen concentration ranges from 14.621 mg/l at 0 C to 6.949 mg/l at 35 C. Given a value of oxygen concentration, this formula and the bisection method can be used to solve for the temperature in degrees Celsiu:s (a) If the initial guesses are set as 0 and 35 C, how many bisection iterations would be required to determine temperature to an absolute error of 0.05 C? (b) Based on (a), develop and test a bisection m-file function to determine Tas a 8, 10, function of a given oxygen concentration. Test your function for Sow and 14 mg/1. Check your results

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

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

Question 1 (a2) What is the reaction force Dx in [N]?

Answered: 1 week ago

Question

The models used to analyse different national cultures.

Answered: 1 week ago

Question

The nature of the issues associated with expatriate employment.

Answered: 1 week ago