Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 0 pts ) Prompts the user to enter a depth in meters and assigns the value to a variable depth using the MATLAB input
pts Prompts the user to enter a depth in meters and assigns the value to a
variable depth using the MATLAB input function.
pts Calculates the speed of a tsunami in meters per second according to the
formula
where and is the depth of the ocean in meters and assigns the
result to the variable velTsunami.
points Create an external function MpsToKmphm for ms to kmh conversion,
that takes an input argument in ms and outputs a value in kmh
a pts Calculate the wave speed of the tsunami in kmh using your external
function MpsToKmphm and print the speed in kmh using the disp function.
b pts Calculate how far, in km the wave will travel in hours, hours, hours.
Include housekeeping commands clear and clc
Include comments.
Have only one command per line.
Make sure the output is suppressed except when the disp function is used
Step 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