Trace vectorized voltage saturation

An actuator accepts command voltages from 0 V through 8 V. The following MATLAB code limits requested voltages while retaining their original positions:


MATLAB
u = [-2 0 3 8 10];
low = u < 0;
high = u > 8;
y = u;
y(low) = 0;
y(high) = 8;


Complete the table with the corresponding entries of low, high, and the final vector y. Enter logical values as exact integers 0 or 1 and voltages as exact integers in volts.

Positionu (V)lowhighFinal y (V)
1-2
20
33
48
510

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 Vectorized Code and Logical Operations Questions: