Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Matlab, Create a program that... (a) (10 pts) prompts the user to enter a value of the ocean depth in meters and assigns the
In Matlab, Create a program that...
(a) (10 pts) prompts the user to enter a value of the ocean depth in meters and assigns the value to a variable depth using the MATLAB input function. (b) (10 pts) Calculates the speed of a tsunami in meters per second according to the formula Veronesi =Vgd where g = 9.81 m/s* and d is the depth of the ocean in meters. Assign a value of 4000 m to d. (c) (10 pts) Calculate the wave speed of the tsunami in km/h using your external function "Mostokmph.m", and print the speed in km/h using the disp function. (d) (10 pts) Calculate how far, in km, the wave will travel in 12 hours. (e) (20 pts) Create an internal function KmToMi, that takes an input value in kilometers, and converts the value to miles and returns that value to the main part of the script. Use it to convert the value obtained in (d) to miles. REMEMBER: internal functions MUST be placed at the end of your scriptStep 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