Generating a heat map (or otherwise) in matlab

5 Ansichten (letzte 30 Tage)
Laith Alhussein
Laith Alhussein am 7 Feb. 2016
Kommentiert: Mayank Dwivedi am 9 Feb. 2016
I've done simulations for an experiment to compare 2 different things, let's call them A and B. The rows of A and B correspond to different experiments. Their sizes are 100*200, so there are 100 experiments and 200 data points. These are plotted against 'trials', lets call it T, which is just 1:200. I was interested to see where along T are A and B significantly different. So, I wrote some code to determine at each instance T, are A and B significantly different.
Edit: I think what I'm looking for is "contour heat map" essentially.
That is:
for kk=1:200
[h,p]=ttest2(A(:,kk),B(:,kk),0.05);
pval(kk)=p;
hval(kk)=h; end
So now I have a vector p that gives me the probability that A and B are significantly different at a given instance T. What I would like to do is generate some kind of map (I guess a heat map would be approprite here? I'm open to ideas though) that shows how the p values change along the T dimension and the A/B dimension. I'd like to draw some kind of shape, or just have some type of indication, that specifically shows the region of p=X (for example, p=0.05). I want to make it obvious that anything touching or inside a given region is a p=X region.
I hope I articulated my question well. I've tried to generate this plot a few times now and it's surprisingly giving me a hard time. I guess I still need to get used to matlab more.
Any help would be appreciated.
  1 Kommentar
Mayank Dwivedi
Mayank Dwivedi am 9 Feb. 2016
Hi Laith,
Can you please elaborate more on what do you mean by A/B dimension? As far as plotting options are concerned MATLAB provides functions for plotting both contour map and heat maps. Please refer to the links below for examples and more information on Contour and Heat Maps in MATLAB:
Some other 2D and 3D plots in MATLAB:
Thanks, Mayank

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by