How do I visualize a matrix of values?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
KSSV
el 15 de Oct. de 2018
Why don't you share the text file.....it can be even viewed with functions like surf, pcolor.
Respuestas (0)
Ver también
Categorías
Más información sobre Data Distribution Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!