Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 : Function for Unit Conversion Write a function named [ speedMPS ] = SpeedConvert ( speedMPH ) that accepts a single speed in
Problem : Function for Unit Conversion
Write a function named speedMPS SpeedConvertspeedMPH 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 miles per hour to meters per second
Problem : Accelerating From to
Electric cars are turning in some impressive acceleration times, typically measured as the time it takes to go from to Car and Driver measured the Ferrari SF Stradale at just seconds! How many 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 "YourBlazerIDRace.m
assign variables for the initial velocity final velocity and acceleration time seconds
call your function SpeedConvert from Problem to convert the initial and final velocities from miles per hour to meters per second
compute the average acceleration in using the equation:
divide your computed acceleration by the acceleration of gravity to find out how many 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
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