How do I visualize a matrix of values?

2 次查看(过去 30 天)
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 个评论
KSSV
KSSV 2018-10-15
Why don't you share the text file.....it can be even viewed with functions like surf, pcolor.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by