Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. The vo lume of liquid V in a hallow horizontal cylinder of radius r and length L is related to the depth of the

image text in transcribed
1. The vo lume of liquid V in a hallow horizontal cylinder of radius r and length L is related to the depth of the liquid h by (a) Write a MATLAB function handle using the following syntax f - Q(h,r,L, V) WRITE YOUR EXPRESSION HERE (b) Plot the function from h 0.5 to 1 using-2 m, L-5 m, V-8 m 3. (c) Determine h using fzero MATLAB built-in function given r = 2m, L-5 m, V-8 m3. (d) Develop your own MATLAB code to solve for h using false-position method. Employ h 0.5 and hu-1 as your initial guesses, e-: 0.001% as your stopping criteria, and maximum iteration of 100. The first lines of your function should have the following form function [root,fx,ea,iter]-false_position(func,x1,xu, es,maxit,varargin) % false-position : root location zeroes of nonlinear equation f(x) -0 % [root , fx , ea , iter)-false-Position(func , x1 , xu , es , maxit,p1,p2, ): % uses false-position method to find the root of func (e) Develop your own MATLAB code to solve for h using secant method. Employ hi-1 = 0.5 and h, = 1 as your initial guesses, es = 0.001% as your stopping criteria, and maximum. iteration of 100. The first lines of your function should have the following form function [root,fx,ea,iter]-secant (func, x0,x1,es,maxit,varargin) (f) Comment why the secant method converges faster than false-position method even though the same initial guesses were employed. Your MATLAB function should display the results in a tabular form containing columns with iteration number, initial guesses, new estimate of the root, and the approximate percent relative error. A sample output if bisection method was used is illustrated below. Iteration, k x1 e.a xr 0.500000 0.500000 x. u 1.000000 0.750000 0.750000 33.333333 0.625000 20.000000 2

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago