https://github.com/Tanentzapf-Lab/LiveImaging_HematopiesisKinetics_Infection_Ho_Carr
Tip revision: d9c8523c1660ea3fd4263074fc9262389b9105cc authored by Tanentzapf-Lab on 04 February 2023, 19:26:02 UTC
Update README.md
Update README.md
Tip revision: d9c8523
runBuildHeatMap.m
clear all; close all %% Clear workspace
folder = uigetdir;
files = dir([folder '\*.mat']);
name = inputdlg('Name');
dimIn = inputdlg('Heatmap Dimensions (Ex: 5)');
dim = str2double(dimIn); %% Dimension of heatmap
mat = zeros(dim, dim);
scale = (1/dim):(1/dim):1;
cat = categorical(scale);
ax = categories(cat);
for i=1: length(files)
readmat = load(fullfile([folder '\' files(i).name]));
mat = mat + readmat.matrix;
end
filename = strcat(name, ".xlsx");
writematrix(mat, filename);
figure(1)
map = heatmap(ax, flip(ax), mat);
map.Title = name;
map.Colormap = winter;