Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a script YourLastName_HW2.m, which 1. calculates the speed of a tsunami in meters per second (m/s) according to the formula V =gd where
Write a script "YourLastName_HW2.m", which 1. calculates the speed of a tsunami in meters per second (m/s) according to the formula V =gd where d = 2500 m is the depth of the ocean in meters, g=9.81 m/s. 2. converts the speed of the tsunami wave from m/s to miles/h using an external function "MpsToMilesph.m". The function should have velocity in m/s as an input argument and velocity in miles/h as an output argument. 3. calculates how far, in miles, the wave will travel in 8 hours. 4. uses the disp function to print the tsunami speed in miles/h, the travelled distance in miles, and corresponding parameter names and units. 5. Includes housekeeping commands clear and clc. 6. Includes comments. 7. has only one command per line. 8. makes 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