invalid concatenation of structure with matrix
1 view (last 30 days)
Show older comments
Here's the full code:
folderTestCur = fullfile(folderTest,setTestCur);
ext = {'*.jpg','*.png','*.bmp'};
filepaths = [];
for i = 1 : length(ext):
filepaths = cat(1,filepaths,dir(fullfile(folderTestCur, ext{i})));
end
6 Comments
SALAH ALRABEEI
on 17 Jun 2021
No in the case, your approach is better. It works even with me without issues.
Accepted Answer
Stephen23
on 18 Jun 2021
P = fullfile(folderTest,setTestCur);
X = {'*.jpg','*.png','*.bmp'};
N = numel(X);
C = cell(1,N);
for k = 1:N
C{k} = dir(fullfile(P,X{k}));
end
F = vertcat(C{:})
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!