Question: Problem 1 : Function for Unit Conversion Write a function named [ speedMPS ] = SpeedConvert ( speedMPH ) that accepts a single speed in

Problem 1: Function for Unit Conversion
Write a function named [speedMPS]= SpeedConvert(speedMPH) that accepts a single speed in miles per hour as an input, converts that speed to meters per second, and returns the converted speed in meters per second as an output. Make sure you:
choose camelCase names for all of your variables
include appropriate comments explaining the purpose of the function, its inputs & outputs, and other aspects
save your function in a file named "SpeedConvert.m" and turn in that file as one of the attachments for this homework
check that your function works by calling it from the command window and verifying that it converts 100 miles per hour to 44.7 meters per second
Problem 2: Accelerating From 0 to 60
Electric cars are turning in some impressive acceleration times, typically measured as the time it takes to go from 0 to 60mph. Car and Driver measured the 2021 Ferrari SF90 Stradale at just 2.0 seconds! How many "g's" do the drivers feel in these cars? Write a script to compute the average acceleration and compare it to the acceleration of gravity. using the following steps:
create a script called "YourBlazerID_Race.m"
assign variables for the initial velocity (0mph), final velocity (60mph), and acceleration time (2.0 seconds)
call your function SpeedConvert from Problem 1 to convert the initial and final velocities from miles per hour to meters per second
compute the average acceleration in ms2 using the equation: Virinal-vinitialtaccol
divide your computed acceleration by the acceleration of gravity (9.81ms2) to find out how many "g's" the driver would experience
use the disp function to display the result with the following message "The average acceleration is "(answer)" times the acceleration of gravity"
make sure you use good programming practices like clearing variables at the beginning, naming variables in camel case, providing appropriate comments, and suppressing output except what you intentionally display or print
 Problem 1: Function for Unit Conversion Write a function named [speedMPS]=

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!