gistlib
You can use the all function in MATLAB to check if all values of a vector are true.
all
Example:
main.mvec = [true true false true]; result = all(vec); disp(result); % Output: 0 75 chars4 lines
vec = [true true false true]; result = all(vec); disp(result); % Output: 0
In this example, the all function returns false (0) because not all values in the vector are true.
gistlibby LogSnag