14 views (last 30 days)

I implemented the minutia heat map presented in this paper (page 7): https://arxiv.org/pdf/1909.09901.pdf

The result is that i have 6 matrixes and i am looking for a way to plot these as shown in the paper (same page), like this:

Basically, the low values is presented in dark, and it gets lighter when it increase.

darova
on 26 Oct 2019

You are using H for rows and W for columns

M1 = zeros(H,W);

% ...

for i = 1 : W

for j = 1 : H

% ...

M1(i,j) = Hijk; % looks like mistake

You can use cells to create 6 matrices automatically

MM = cell(6,1);

M = zeros(H,W);

for k = 1:6

for i

for j

for t

% do stuff

end

% ...

M(i,j) = %...

end

end

MM{k} = M;

end

After you found max and min values (global) use loop to visualize

for k = 1:6

figure(k)

heatmap(MM{k});

caxis([minx maxx])

colormap gray

end

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 5 Comments

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760145

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760145

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760167

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760167

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760276

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760276

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760283

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760283

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760288

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760288

Sign in to comment.