How to delete data from 2D matrix?
25 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Wei Qing
am 9 Jan. 2013
Kommentiert: John D'Errico
am 3 Jun. 2014
a = 155 34,
127 134,
223 334,
135 366,
123 418,
Lets say I want to delete the second row data so a become like this.
a = 155 34,
223 334,
135 366,
123 418,
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 9 Jan. 2013
a(2,:) = [];
2 Kommentare
Grace
am 3 Jun. 2014
Hi, extended from this question, what if i want to delete several rows from a matrix? How am i going to do this?
John D'Errico
am 3 Jun. 2014
TRY SOMETHING! Logically, what would this do:
a([2 3],:) = [];
??
The trick to MATLAB is to try out what seems logical. Very often it will do what you might expect. Read the help where possible, but you will learn much by playing around.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!