How to compile two different array type into one variable
rootdir = ‘C:UsersacerDesktopabc’;
filelist = dir(fullfile(rootdir,’***.xlsx’));
X = []; Y = [];
for ii = 1:length(filelist)
filelist(ii).data = importdata(fullfile(filelist(ii).folder,filelist(ii).name));
filelist(ii).data = (filelist(ii).data(:,:));
end
% combine all the data, one after the other, vertically:
all_data = vertcat(filelist.data); %this is where the error lies, since the data file were struct and cell
% How to convert all struct to cell assuming I have multiple struct file.rootdir = ‘C:UsersacerDesktopabc’;
filelist = dir(fullfile(rootdir,’***.xlsx’));
X = []; Y = [];
for ii = 1:length(filelist)
filelist(ii).data = importdata(fullfile(filelist(ii).folder,filelist(ii).name));
filelist(ii).data = (filelist(ii).data(:,:));
end
% combine all the data, one after the other, vertically:
all_data = vertcat(filelist.data); %this is where the error lies, since the data file were struct and cell
% How to convert all struct to cell assuming I have multiple struct file. rootdir = ‘C:UsersacerDesktopabc’;
filelist = dir(fullfile(rootdir,’***.xlsx’));
X = []; Y = [];
for ii = 1:length(filelist)
filelist(ii).data = importdata(fullfile(filelist(ii).folder,filelist(ii).name));
filelist(ii).data = (filelist(ii).data(:,:));
end
% combine all the data, one after the other, vertically:
all_data = vertcat(filelist.data); %this is where the error lies, since the data file were struct and cell
% How to convert all struct to cell assuming I have multiple struct file. cell, struct, importing excel data, data import, compile, convert, combine MATLAB Answers — New Questions