convert table to image

조회 수: 24 (최근 30일)
hakan
hakan 2023년 5월 18일
댓글: Image Analyst 2023년 5월 21일
Hello everyone,
I have a table size 175x81 .each column is feature.
my question is that .İneed to convert this to image but i dont know how to do it ?
  댓글 수: 3
Walter Roberson
Walter Roberson 2023년 5월 20일
You have 81 columns so are you wanting each image to be 1x81 or 3x27 or 9x9 or 27x3 or 81x1?
The id does not appear to be a feature so perhaps you want a 5x16 or 8x10 image?
Image Analyst
Image Analyst 2023년 5월 21일
It does not make sense for each row to be an image since the columns represent totally different things. Do you want the columns to be images, like @Walter Roberson said? If so, which columns? Probably not all 81 of them (for 81 different images), but maybe. How do you want to take the 175 elements in each column and make a 2-D image out of them? Exactly how many rows and columns do you want it to have?
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

댓글을 달려면 로그인하십시오.

답변 (1개)

chicken vector
chicken vector 2023년 5월 18일
편집: chicken vector 2023년 5월 18일
% Define example table:
tab = table(rand(100));
% Convert table to array:
arr = table2array(tab);
% Display array:
imshow(arr);
  댓글 수: 9
Walter Roberson
Walter Roberson 2023년 5월 18일
I find that people often do not pay as much attention as they should to repeatability of color when using rescale() or imagesc() or imshow([]) . With the default parameters, or default caxis() / clim() , the mapping of particular numeric value to color can change if the lower bound of the data or the upper bound of the data change.
So for example a temperature map might show 25C as being moderately comfortable one time, but if the low for the next map increased, then 25C might be at a lower portion relative to low-to-high for the day so 25C might show up with colors associated with cooler values when looking at two images side-by-side (and not paying close attention to any colorbars.)
I know I've been sloppy on this aspect many many times myself, but when I am generating graphics that might end up being compared, I try to remember to use scaling relative to absolute ranges so that the colors have some consistent meaning.
In this particular case, though, where numeric values for "features" are being implicitly compared regardless of the fact that the features might have no mathematical relationship to each other, then it probably does not matter. I'm not sure that there is any meaningful coloration in this situation.
chicken vector
chicken vector 2023년 5월 19일
I most definetly agree.
If you need multiple plots when you deal with physical variables, in my opinion, is always good practice to set some meaningful and constant boundaries for the scaling operation.
Dealing usually with modelling problems, I have learnd this the hard way. I would even say the hardest since I mostly use colorbars...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by