How to select columns in a matrix whose first row data is positive?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Misi
am 21 Jul. 2022
Kommentiert: Misi
am 21 Jul. 2022
Greetings
I have this matrix:
A=[-1 2 5 4 -4;1 2 3 4 6]
I want to extract the data according to first row. Indeed, I want to extract the columns with positive data in the first row, for example for the above matrix I am searching for a code to give me the below matrix
ans=[2 5 4;2 3 4]
0 Kommentare
Akzeptierte Antwort
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!