Question: MATLAB code help GIVEN: You are designing a spherical tank (figure below) to hold water for the City of Townsville. The volume of liquid it
MATLAB code help

GIVEN: You are designing a spherical tank (figure below) to hold water for the City of Townsville. The volume of liquid it can hold can be computed as, [3R -h] v=th2 3 where V = volume [m), h= depth of water in tank [m], and R = the tank radius [m]. a) If the mayor of Townsville wants to hold 50 m of water, write a Matlab program to solve for h using the bisection method for a range of R value from 2.5 m to 3.5 m with an increment of 0.1 m. Compute the answer with an absolute approximate error of 105. b) Solution check with Matlab built-in function fzero. ANSWERS: In the command window, output only the answers in column vector form (11% 3). The 1st column being the R value, the 2nd column being answers using bisection method, and the 3rd column being answers using fzero. GIVEN: You are designing a spherical tank (figure below) to hold water for the City of Townsville. The volume of liquid it can hold can be computed as, [3R -h] v=th2 3 where V = volume [m), h= depth of water in tank [m], and R = the tank radius [m]. a) If the mayor of Townsville wants to hold 50 m of water, write a Matlab program to solve for h using the bisection method for a range of R value from 2.5 m to 3.5 m with an increment of 0.1 m. Compute the answer with an absolute approximate error of 105. b) Solution check with Matlab built-in function fzero. ANSWERS: In the command window, output only the answers in column vector form (11% 3). The 1st column being the R value, the 2nd column being answers using bisection method, and the 3rd column being answers using fzero
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
