Question: Small aircraft weight limit Write an if - else statement that assigns safetyCheck with 1 if the sum of passengerWeight and cargoWeight is less than
Small aircraft weight limit
Write an ifelse statement that assigns safetyCheck with if the sum of passengerWeight and cargoWeight is less than or equal maxWeight. Otherwise, assign safetyCheck with
Ex If passengerWeight is cargoWeight is and maxWeight is then safetyCheck is assigned with If passengerWeight is cargoWeight is and maxWeight is then safetyCheck is assigned with
Function
Save
Reset
MATLAB Documentatic
function safetyCheck CargolimitpassengerWeight cargoweight
passengerweight: Total passenger weight pounds
cargoweight: Total cargo weight pounds
maxWeight ; Maximum weight allowed
Assigns safetycheck with if the sum of passengerWeight and cargoweight is less
than or equal maxWeight. Otherwise, assign safetycheck with
safetycheck ;
end
Code to call your function
Cargolimit
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
