Azzera filtri
Azzera filtri

delete matrix row with certain value

2 visualizzazioni (ultimi 30 giorni)
Patrick
Patrick il 11 Nov 2014
Commentato: Patrick il 11 Nov 2014
how can i remove the rows with a certain number say, 2?

Risposta accettata

the cyclist
the cyclist il 11 Nov 2014
M = magic(3);
M(any(M==2,2),:) = []

Più risposte (1)

Adam
Adam il 11 Nov 2014
A = [2 3 4 5; 6 7 8 9; 2 1 1 1; 3 3 3 3];
A( any(A == 2, 2 ),: ) = [];

Categorie

Scopri di più su Data Import and Network Parameters in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by