How we can make a HeatMap like this?

1 vue (au cours des 30 derniers jours)
Ali N
Ali N le 7 Nov 2019
Commenté : Ali N le 7 Nov 2019
Hello all
How we can make a HeatMap like this from the data that I attached?
  1 commentaire
darova
darova le 7 Nov 2019
You have to try to use griddata

Connectez-vous pour commenter.

Réponse acceptée

Stijn Haenen
Stijn Haenen le 7 Nov 2019
Modifié(e) : Stijn Haenen le 7 Nov 2019
Hi,
Maybe not the best way but it works:
velocityrange=-80:5:80;
momentrange=-250:10:250;
for i=1:numel(momentrange)
for j=1:numel(velocityrange)
b=find(abs(moment-momentrange(i))<2.5);
c=find(abs(velocity-velocityrange(j))<5);
count=0;
for k=1:numel(b)
if find(b(k)==c)
count=count+1;
end
end
heatmap(i,j)=count;
end
end
imagesc(heatmap)
  1 commentaire
Ali N
Ali N le 7 Nov 2019
Thanks Stijn
But its not working on the data that i uploaded.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by