how to copy matrix information

2 views (last 30 days)
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

Accepted Answer

Star Strider
Star Strider on 24 Jan 2016
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,:);

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!