How can matlab judge that each element in a matrix is greater than a number When each element of a is greater than 1.01 or each element of a is less than 0.99 Is that right? While a1.01

How can matlab judge that each element in a matrix is greater than a number When each element of a is greater than 1.01 or each element of a is less than 0.99 Is that right? While a1.01


While all (a1.01)% for 1-dimensional matrix (size MX1 or 1xn)
While all (all (a1.01))% for two-dimensional matrix (size mxn)



Element judgment in MATLAB matrix
I want to design a matrix to know the fields with 0 in each column
as follows
id A B C D E F G H
1 1 1 0 0 1 1 1 0
2 1 1 0 0 1 1 1 0
3 1 1 1 0 1 1 1 0
4 1 1 1 0 1 1 1 0
5 2 1 0 0 1 1 1 0
6 3 1 0 0 1 1 1 1
If you want the following results to appear, display the fields with 0 in each column
id
1 C D H
2 C D H
3 D H
4 D H
5 C D H
6 C D
Matrix code:
a=[1 1 0 0 1 1 1 0
1 1 0 0 1 1 1 0
1 1 1 0 1 1 1 0
1 1 1 0 1 1 1 0
2 1 0 0 1 1 1 0
3 1 0 0 1 1 1 1];
Whether it's design concepts
Or code
Thank you very much~


clear
k=1;
a=[1 1 0 0 1 1 1 0
1 1 0 0 1 1 1 0
1 1 1 0 1 1 1 0
1 1 1 0 1 1 1 0
2 1 0 0 1 1 1 0
3 1 0 0 1 1 1 1];
m=zeros(1,2);
for i=1:6
for j=1:8
if (a(i,j)==0)
m(k,1)=i;
m(k,2)=j;
k=k+1;
else
k=k+1;
end
end
end