Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago