draw contour from given data
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i have attached one excel file which contains 3 column long,lat,data.I want to draw a contour plot
1 commentaire
Réponse acceptée
Ameer Hamza
le 11 Avr 2020
Modifié(e) : Ameer Hamza
le 11 Avr 2020
Something like this
data = readmatrix('final.xlsx');
x = data(:,1);
y = data(:,2);
v = data(:,3);
[X,Y] = meshgrid(unique(x), unique(y));
V = reshape(v, size(X));
contour(X,Y,V);
Data values at a few points are messing up the colors of all the contour lines. You mat consider filtering values in matrix v in the above code.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283771/image.png)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Contour Plots 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!