필터 지우기
필터 지우기

How do I visualize a matrix of values?

조회 수: 2 (최근 30일)
Cliff Karlsson
Cliff Karlsson 2018년 10월 15일
편집: Cliff Karlsson 2018년 10월 15일
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