unable to load file in Matlab Answers

조회 수: 20 (최근 30일)
William Rose
William Rose 2024년 12월 16일
이동: the cyclist 2025년 11월 18일 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');
Error using load
Unable to find file or directory 'data.txt'.
whos
Suggestions? Thank you.

채택된 답변

DGM
DGM 2024년 12월 17일
이동: the cyclist 2025년 11월 18일 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
William Rose
William Rose 2025년 11월 18일 20:22
이동: the cyclist 2025년 11월 18일 22:14
@DGM, thank you for your suggestion. If you move your comment to an answer, I would like to accept it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by