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;
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
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
5 Comments
darova (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760145
Katie (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760167
Ahmed Madhun (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760276
darova (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760283
Ahmed Madhun (view profile)
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/487459-plot-a-heatmap-from-a-matix#comment_760288
Sign in to comment.