unable to load file in Matlab Answers
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
William Rose
el 16 de Dic. de 2024
Movida: the cyclist
el 18 de Nov. de 2025 a las 22:14
I have been unable to load data from a file in Matab Answers for a week or more. I can attach a data file to my answer by clicking on the paper clip icon, then specifying the file. When I try to load the file, I get an error message: 'Unable to find file or directory.'. I have tried .mat and .txt and .csv files, with the same results. I have tried loading a file from my computer, and I have tried loading a file from the thread, with the same result. When I try the loading the same file in regular Matlab, there is no problem. Example:
a=load('data.txt');
whos
Suggestions? Thank you.
2 comentarios
Walter Roberson
el 16 de Dic. de 2024
This has already been reported, https://www.mathworks.com/matlabcentral/discussions/general/877440-known-problems-in-matlab-answers/2617019#reply_2617019
Respuesta aceptada
DGM
el 17 de Dic. de 2024
Movida: the cyclist
el 18 de Nov. de 2025 a las 22:14
I've noticed that at least for image files, it can suffice to use the direct link to the file instead of the relative path. Apparently load() and fileread() behave differently when given a url though.
That said, even imread() will seemingly randomly fail to find the file when given the url. I end up running it again and it works.
1 comentario
William Rose
el 18 de Nov. de 2025 a las 20:22
Movida: the cyclist
el 18 de Nov. de 2025 a las 22:14
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings 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!