Deleting rows from array

2 visualizaciones (últimos 30 días)
Rachel Ramirez
Rachel Ramirez el 3 de Dic. de 2020
Respondida: David Hill el 3 de Dic. de 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?

Respuesta aceptada

David Hill
David Hill el 3 de Dic. de 2020
a(a(:,3)>5,:)=[];

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by