How to Read a file with unknown name
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
naman
el 24 de En. de 2017
Comentada: naman
el 24 de En. de 2017
Hi
I get one .csv file in a directory and I cannot control the name of it. Therefore, I want to read it without knowing its name. How can I do it ?
0 comentarios
Respuesta aceptada
John Chilleri
el 24 de En. de 2017
Editada: John Chilleri
el 24 de En. de 2017
Hello,
You can do so like this (assuming only one csv file):
A = dir('*.csv');
B = csvread(A.name);
Hope this helps!
Más respuestas (1)
Image Analyst
el 24 de En. de 2017
Use dir('*.csv') to get a list of all csv files in that folder. See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
0 comentarios
Ver también
Categorías
Más información sobre Data Import and Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!