How do I delete a row from a matrix?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nieck Dam
el 2 de Jul. de 2017
Comentada: Star Strider
el 2 de Jul. de 2017
I have got a matrix with in the 3th column the number 1 or 0. Now I want to delete a row from a matrix when it has got a 0 in the 3th column, so the matrix will only have the number 1 in the 3th column. Can someone help me with this?
0 comentarios
Respuesta aceptada
Star Strider
el 2 de Jul. de 2017
If ‘M’ os your matrix, this works:
M = M(M(:,3)==1, :)
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!