Logical indexing returns different dimensions
Ältere Kommentare anzeigen
a = [3, 2]
b = [1; 1] == 1
a(b) % returns a 1x2 array
a = [3, 2; 4, 5]
b = [1; 1; 1; 1] == 1
a(b) % returns a 4x1 array
1 Kommentar
Umesh Kumar Singla
am 12 Jan. 2023
Bearbeitet: Umesh Kumar Singla
am 12 Jan. 2023
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!