Find data in a matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a 517x401 meteorological data matrix containing values between 0 to 1. The latitude and longitude vectors are 401x1 and 517x1 respectively.
I want to find data with values greater than 0.5, and the corresponding latitude and longitude values.
Using find() to do this yields an index vector that does not serve the purpose. What is an appropriate way to do this?
Thanks.
3 Kommentare
DGM
am 26 Mär. 2021
Rik is right. I forgot find() supports both syntaxes:
linearindices=find(X);
and
[rowsubs colsubs]=find(X);
Akzeptierte Antwort
KSSV
am 26 Mär. 2021
[X,Y] = meshgrid(lon,lat);
idx = A>0.5 ; % A is your data
iwant = [X(idx) Y(idx) A(idx)] ;
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polar Plots 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!