how can i solve the error Reference to non-existent folder
Mostrar comentarios más antiguos
when i try to call ficheiro the error is Reference to non-existent field 'folder'.
arqdir = 'F:\TCC-GENTIL\New Data';
files = dir(fullfile(arqdir,'*.nc'));
ficheiro=fullfile(files(5),files(5).name);
please can someone explain me how can i solve it?
1 comentario
Gentil Mabote
el 10 de Sept. de 2021
Respuesta aceptada
Más respuestas (1)
I guess, that the code is not:
ficheiro = fullfile(files(5), files(5).name);
% but:
ficheiro = fullfile(files(5).folder, files(5).name);
The DIR command of old Matlab versions did not define the field "folder". Which Matlab version are you using?
A workaround is:
arqdir = 'F:\TCC-GENTIL\New Data';
files = dir(fullfile(arqdir, '*.nc'));
ficheiro = fullfile(arqdir, files(5).name);
1 comentario
Gentil Mabote
el 10 de Sept. de 2021
Categorías
Más información sobre COM Component Integration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!