For five actuator channels, logical arrays indicate a normal permission, a backup permission, and a fault:
normal = logical([1 0 1 0 0]); backup = logical([0 1 1 0 1]); fault = logical([1 0 0 0 1]); run = normal | backup & ~fault;
The required policy permits a channel to run when either permission is true, provided its fault flag is false. Which statement correctly identifies the current result and the replacement expression that implements this policy?
The current result is [1 1 1 0 0]; replace the expression with xor(normal,backup) & ~fault.
The current result is [1 1 1 0 0]; replace the expression with (normal | backup) & ~fault.
The current result is [1 1 1 0 0]; replace the expression with normal | (backup & ~fault).
The current result is [0 1 1 0 0]; keep the expression normal | backup & ~fault unchanged.
Unlock full course notes by signing up
Complement Two Pump Conditions
A test rig records whether each of two pumps is ready at every sampling instant. Equal-sized logical row arrays A and B contain these readiness states, with true meaning ready.
Complete each MATLAB assignment with a single elementwise operator, either & or |. The completed assignments must work for every possible pair of readiness states.
For neitherReady, an entry must be true when neither pump is ready:
Preserve Sample Pairing During Implicit Expansion
Three samples each have a temperature in degrees Celsius and a pressure in kPa. Entries with the same sample number belong together, but the arrays have different orientations:
Using current MATLAB with implicit expansion, the intended output is one column-vector decision per sample: temperature below 50 degrees Celsius AND pressure below 200 kPa. Which statement correctly describes the current output dimensions and a way to obtain the intended pairing? The operator .' denotes nonconjugate transpose.
Separate Majority from Exactly-Two Voting
Three independent controller channels record whether they request cooling during eight synchronized scans. Matching positions in the following logical row arrays refer to the same scan; true means that the channel requests cooling.
Use element-by-element Boolean conditions to determine two quantities:
The number of scans in which at least two channels request cooling.