MATLAB: How to copy matrix information

for loopif statement

if i have a matrix A with dimension 800X3. i am a rookie in this so bear with me if i want to check matrix A (all colums of 3rd row A(:,3)) for value below 8 and if there is a value below 8 then create a new matrix B with all the corresponding row and colum of that value how do i do it
thank you it would be much appriciated if you could help

Best Answer

I’m not certain what you want to do.
See if this works for you:
A = randi(25, 50, 3); % Create Data
B = A(A(:,3)<8,:);