Hi,
Assuming you are trying to create a table of images and text in different columns, images can be stored as arrays in the table. If you have a folder containing images named ‘myfolder’ and a MATLAB variable named ‘imagecontent’ stored as cell array of strings with the text corresponding to images , the following sample code can be used to create table:
% List contents of the folder
info = dir myfolder;
% Get number of images in the folder
numimages = numel(info);
% Create table
T = table(cell(1, numimages), imagecontent);
for k = 1:numimages
filename = info(k).name;
% Fill the table with image information
filecontent = {imread(filename)};
T(k,1) = filecontent;
end
Also note that length of vector ‘imagecontent’ must be same as number of images to create table. While exporting a table from MATLAB, only specific file formats are supported. Refer this link for supported file formats.
Refer to the following link for more information on working with tables:https://www.mathworks.com/help/matlab/matlab_prog/create-a-table.html#CreateAndWorkWithTableExample-1