Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB question You are designing a spherical tank (see figure below) of radius R = 3m, to hold water for a small village in a
MATLAB question
You are designing a spherical tank (see figure below) of radius R = 3m, to hold water for a small village in a developing country. The volume of liquid it can hold can be computed as V = pi h^2 3R - h/3 Where h is the depth of the water and V is the volume of water. A. Write a function that uses the Newton-Raphson method to calculate the root and number of iterations to obtain the root. Your function should accept the function f, derivative function df, initial guess x_i, and the precision as inputs. function [root, iter] = newraph(f, df, x, precision) B. Write an m-file that uses the function from part A to determine the depth that the tank must be filled to so that it holds 30m^3 of water. Prompt the user for the initial guess of xi. Use a precision of 1e - 4. Your m-file should plot the function f and derivative function df. Also, mark the roots with a blue upward triangleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started