making a area plot with lat,lon and a variable corresponding to that location
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Thishan Dharshana Karandana Gamalathge
le 5 Juil 2017
Commenté : Walter Roberson
le 6 Juil 2017
I have latitude, longitude and temperature corresponding to those locations. How can I make a color plot in a way it show how temperature varies along that region? When I bring the cursor to the location I am interested at, if I can read the temperature, that would be much helpful as well.
Thanks, Thishan
0 commentaires
Réponses (2)
KSSV
le 6 Juil 2017
You need to read about pcolor , surf .
[X,Y,Z] = peaks(50) ;
figure(1)
surf(X,Y,Z)
figure(2)
pcolor(X,Y,Z)
If lon, lat are your spatial coordinates and T is your mxn temeprature matrix:
surf(lon,lat,T) ; % if throws error, use T'
7 commentaires
Thishan Dharshana Karandana Gamalathge
le 6 Juil 2017
Modifié(e) : Thishan Dharshana Karandana Gamalathge
le 6 Juil 2017
Walter Roberson
le 6 Juil 2017
Chances are that dir() will return the file names in order by encoded date; you could sort() the names to be certain. It looks to me as if you would not need to use something like natsortfiles() from the File Exchange as you have a fixed number of digits for each field, and the date fields are arranged in a useful order already.
Walter Roberson
le 6 Juil 2017
You will probably need to use either griddedInterpolant or scatteredInterpolant; then you would call the resulting function with an array of locations and plot the result.
0 commentaires
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!