invalid concatenation of structure with matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
assia assia
le 17 Juin 2021
Commenté : assia assia
le 18 Juin 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 commentaires
SALAH ALRABEEI
le 17 Juin 2021
No in the case, your approach is better. It works even with me without issues.
Réponse acceptée
Stephen23
le 18 Juin 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{:})
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!