invalid concatenation of structure with matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
assia assia
am 17 Jun. 2021
Kommentiert: assia assia
am 18 Jun. 2021
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 Kommentare
SALAH ALRABEEI
am 17 Jun. 2021
No in the case, your approach is better. It works even with me without issues.
Akzeptierte Antwort
Stephen23
am 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{:})
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!