Hello.
I want to reshape each matrix of cell.
Using this code, I got the cell matrix. How can I reshape the matrix (1325 x180) to (25 x 9540)?
clear allclose all% Create the list of csv files
s = dir('*.csv');% Read from each csv file
c = cell(numel(s),1 ); for kk = 1:numel(s ) filePath = fullfile(s(kk).folder,s(kk).name ); x = csvread(filePath ); c{kk} = x; end% Find the minumul number of row and column
row = cellfun(@(x) size(x,1),c ); col = cellfun(@(x) size(x,2),c ); minRow = min(row ); minCol = min(col);% Adjust the size of each array to minRow-by-minCol
c = cellfun(@(x) x(1:minRow,1:minCol),c,'UniformOutput',false);% How to reshape (1325 x180) to (25 x 9540) ?
Best Answer