Question: Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pounds, then an additional

Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pounds, then an additional 4 dollars is added to the toll. Lastly, the toll amount is doubled due to heavy traffic

Complete the example to calculate finalToll. The base toll for a bridge

Bridge toll Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pounds, then an additional 4 dollars is added to the toll. Lastly, the toll amount is doubled due to heavy traffic. Your Function Save Reset MATLAB Documentation 1 function finalToll CalculateToll (baseToll, vehicleWeight) 21% baseToll: The base toll to cross a bridge in dollars 31% vehicleweight: Weight of a vehicle in pounds 4 % Assign fina!Toll with baseToll 6 7 8 9 10 % If vehicle's weight is over 5,eee pounds, increase toll by 4 dollars % Double toll amount due to heavy traffic 12 end Code to call your function C Reset 1 CalculateToll(1e, 35ee) Run Function

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!