MATLAB: How to compare each element of a matrix with a number

matrix manipulation

i have a matrix A=[40×14]and B=[14×1]. when i perform A*B i get a matrix C of dimension [40×1].I want to check each element of matrix C to see whether they are greater or equal to one. How can i do that in matlab? actually i want to check it using sum of the products of the matrices A and B. The product of row1 of A and column1 of B. i want to do this 40 times for the 40 rows
for example A=[0 2;1 2;3 1;1 2] and B=[2;1] To perform A*B we must do ((0x2)+(2×1)) to get the first element. I want to check using this method if each element of the product A and B is greater or equal to one.
Thank you

Best Answer

for i1 = 1:40
s(i1) = (sum(A(i1,:).*B(:).')>=1); (<-- Corrected)
end