extract a slice from a 2D matrix with specific values
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lama Hamadeh
am 16 Dez. 2021
Kommentiert: Lama Hamadeh
am 16 Dez. 2021
Hi,
I want to extract a slice of a 2D matrix from a bigger 2D matrix with certain values. So, if I have a matrix as follwoing:
M = [1 2;
1 4;
7 1
9 1
0 3
0 4
9 0
8 0];
And I want to extract a slice
that only has values in the second column equal one.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/836065/image.png)
Any help would be appreicted.
Thanks.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!