invalid concatenation of structure with matrix
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
assia assia
el 17 de Jun. de 2021
Comentada: assia assia
el 18 de Jun. de 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 comentarios
SALAH ALRABEEI
el 17 de Jun. de 2021
No in the case, your approach is better. It works even with me without issues.
Respuesta aceptada
Stephen23
el 18 de Jun. de 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{:})
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!