Question: Complete the function Calculate Toll. Use an if statement to determine if the vehicle's weight is over 5 , 0 0 0 pounds. Ex .
Complete the function Calculate Toll. Use an if statement to determine if the vehicle's weight is over pounds.
Ex CalculateToll yields
Hint An if statement has a closing end statement.
Function
B Save
C Reset
MATLAB Documentation
function finalToll CalculateToll baseToll vehicleweight
baseToll: The base toll to cross a bridge in dollars
vehicleweight: Weight of a vehicle in pounds
TODO: Assign finalToll with baseToll
finalToll ;
TODO: If vehicleweight is over pounds, increase finalToll by dollars
TODO: Assign finalToll with twice the value of finalToll
end
Code to call your function
C Reset
CalculateToll
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
