How to extract a specific range of values from a multi dimensional matrix?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Novice Geek
am 21 Jan. 2015
Kommentiert: Martin Olowe
am 17 Jun. 2021
Hi,
I have a double matrix with the following dimensions: 37 X 745 X 32. This matrix contains many zeros and also quite a lot of values between the range 100-999.9. I would like to extract data values which are in a specific range (ex: 815.6 - 816.4) from this matrix, in order to generate a kernel estimation plot. Can anyone please help me here, as I am unable to figure out how to do it?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 21 Jan. 2015
The values lose their matrix identity and return as a column vector, but ‘M1’ has them all.
This works:
M = 1000*rand(37, 745, 32); % Create Data
M1 = M((M >= 815.6) & (M <= 816.4)); % Vector Of Desired Values
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!