How do I visualize a matrix of values?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a dataset with temperatures from an rotating cylinder. I have got some help to visualize it like a flat heatmap. Can someone show me some more examples of different ways to visualize the dataset?
filename = ['data\\day\\' 'filenames.txt'];
T = readtable(filename);
tsize = size(T);
tsize (1);
filename = strcat('data\\day\\', string(T{100,1}));
map100 = getHeatMap(filename);
filename = strcat('data\\day\\', string(T{1000,1}));
map1000 = getHeatMap(filename);
k=imshow([map100]);
colormap(gca, 'jet');
k=imshow([map1000]);
colormap(gca, 'jet');
function heat = getHeatMap(filename)
s = dir(filename);
fin=fopen(filename,'r');
I=fread(fin,s.bytes,'uint8=>uint8');
w = uint16(I(1))+256*uint16(I(2));
h = uint16(I(3))+256*uint16(I(4));
skip = s.bytes - w*h + 1;
IN = I(skip:1:s.bytes);
Z=single(reshape(IN,w,h));
Z=griddedInterpolant(Z');
y_range = linspace(1.0,single(h),360);
x_range = linspace(1.0,single(w),512);
heat = uint8(Z({y_range, x_range}));
fclose(fin);
end
This code produces an image like this:
But I have no clue of how to proceed to get other ways to show the image. The goal is to be able to make it easier to detect areas where the temperature is higher than "normal" data_file
1 commentaire
KSSV
le 15 Oct 2018
Why don't you share the text file.....it can be even viewed with functions like surf, pcolor.
Réponses (0)
Voir également
Catégories
En savoir plus sur Data Distribution Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!