Question: ENGR 1 2 5 SAQ Logic and Branches Complete the MATLAB homework in one script . m file Zero points for any problems with red

ENGR 125 SAQ Logic and Branches
Complete the MATLAB homework in one script .m file
Zero points for any problems with red errors
Write a script that will determine the cost of a speeding ticket. You will have two inputs representing a speed limit, speedLimit, and driving speed, driveSpeed, in miles per hour (mph) and a single output representing the traffic ticket amount, ticketAmount. The price of the ticket will depend on the following breakdown. Driving 10mph under the speed limit (or slower) receives a $50 ticket. Driving 6-20mph over the speed limit receives a $75 ticket. Driving 21-40mph over the speed limit receives a $150 ticket. Driving faster than 40mph over the speed limit receives a $300 ticket. Otherwise, no ticket is received.
a. Make sure to use the three variables I provided above, in yourjscript
 ENGR 125 SAQ Logic and Branches Complete the MATLAB homework in

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!