I need to apply the OR operation to the column of a matrix. Here an example:
a=[0 0 1; 0 1 1];
[0 0 1]
Direct link to this answer:
Your example is not the 'OR', it is the 'AND', of the columns. The 'OR' of the columns is done this way:
b = any(a,1);
The 'AND' would be done this way:
b = all(a,1);
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test
Opportunities for recent engineering grads.
New to MATLAB?
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend you select United States from the following list:
See all countries