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:


neitherReady = (~A) (~B);


For notBothReady, an entry must be true when the pumps are not both ready:


notBothReady = (~A) (~B);

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Element-by-Element Boolean Operators Questions: