Question
Could someone help me with these MatLab and Calculus questions, please? Thank you! *Please modify my MatLab code, and provide your own code as each
Could someone help me with these MatLab and Calculus questions, please? Thank you!
*Please modify my MatLab code, and provide your own code as each question requires. Feel free to include your own code and general concepts in order to solve these problems, even if they go beyond the minimal code provided, if that would help, thank you very much!
----
I apologize if I didn't phrase things properly or if the questions are long. I thought that, since all of the questions relate to similar concepts, it would be prudent if they were all presented together since some questions require similar procedures and results from previous questions in order to solve them properly.
----
Please show all work, and improve any provided details as much as necessary, and also describing the necessary steps, and the necessary code and syntax would be greatly appreciated as well.
I would appreciate any help with this homework very much and thank you for your time and consideration. I hope that you have a wonderful day!
----
The equation given for velocity in the pipe is v=2gHtanh(2L2gHt), where tanh is the hyperbolic tangent function. In MatLab just type tanh(). Convert the equation into a function of H by subtracting v from both sides of the equation. f(H)=2gHtanh(2L2gHt)v Write a MatLab script/function that will: a) using the values for the parameters as given plot f(H) vs H for H=0 to H=4m. Make sure to label the plot correctly with units. b) Use the Bisection method to find the root to f(H) that will result in a pipe velocity of 5sm. Inputs to the function will include: the function; lower and upper bounds; desired relative absolute error - with a default value of 0.0001%; maximum number of iterations - with a default value of 50. Use a desired Function outputs will include: the root; the function value at the root; the associated relative percent error; and the number of iterations. Set format long in your script to show adequate number of digits in your results. 5.4 As shown in Fig. P5.4, the velocity of water, v(m/s), discharged from a cylindrical tank through a long pipe can be computed as v=2gHtanh(2L2gHt) where g=9.81m/s2,H= initial head (m),L= pipe length (m), and t= elapsed time (s). Develop a MATLAB script that (a) plots the function f(H) versus H for H=0 to 4m (make sure to label the plot) and (b) uses LastNameBisect with initial guesses of xl=0 and xu=4m to determine the initial head needed to achieve v=5m/s in 2.5s for a 4-m long pipe. In addition, use Ead =0.0000001. Also, set format long in your script so you display 15 significant digits for your results. 5.5 Repeat Prob. 5.1, but use the false-position method to obtain your solution. 5.6 Develop an M-file for the false-position method. Test it by solving Prob. 5.1Step 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