Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started