Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedMATLAB 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 triangle

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

Students also viewed these Databases questions

Question

2. What are the prospects for these occupations?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago