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

 Réponse acceptée

Star Strider
Star Strider le 24 Jan 2016

0 votes

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,:);

2 commentaires

Christopher Chettri
Christopher Chettri le 24 Jan 2016
thank you
Star Strider
Star Strider le 24 Jan 2016
My pleasure!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by