convert table to image

60 ビュー (過去 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 Center および File ExchangeConvert Image Type についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by