Deleting rows from array

2 views (last 30 days)
Rachel Ramirez
Rachel Ramirez on 3 Dec 2020
Answered: David Hill on 3 Dec 2020
If I have an array with 20 rows and 3 columns but I want to delete any row in which the 3rd column is greater than 5, how would I do it?

Accepted Answer

David Hill
David Hill on 3 Dec 2020
a(a(:,3)>5,:)=[];

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!