readmatrix "not enough input arguments"
이전 댓글 표시
I'm getting a really strange error when trying to use readmatrix() to load a .csv file. It tells me there's not enough input arguments!
d_obs = readmatrix(sprintf('%s/%s',NMR_path,NMR_obs_filename));
this is the command I'm using. The strange thing is that just last week, this worked perfectly, and I have not changed anything since then. If it is at all related, I also get a message "The import tool doesn't have access to read the file" when I try to open the file directly by double-clicking it in the current folder tab. I checked the files and they're not empty.
Anyone got some idea of what is going on here?
댓글 수: 9
Walter Roberson
2020년 11월 26일
편집: Walter Roberson
2020년 11월 26일
Is it possible that NMR_path or NMR_obs_filename are empty?
What shows up for
which -all readmatrix
Frederikke Hansen
2020년 11월 26일
Ameer Hamza
2020년 11월 26일
Can you post the complete error message. Everything in red.
As a sidenote, the MATLAB's way to create complete path is something like this
d_obs = readmatrix(fullfile(NMR_path,NMR_obs_filename));
Frederikke Hansen
2020년 11월 26일
Ameer Hamza
2020년 11월 26일
The error occurs inside a try-catch block. Can you run the following line in the command window
dbstop if caught error
and then rerun your code. MATLAB will pause the code at the line where the error occurs. Show us the file and the line at which error occurs?
Star Strider
2020년 11월 26일
Try this:
which invert_logdist -all
That might give some idea of what the problem is, since I very much doubt that readmatrix does any processing.
Also, please post the MATLAB release/version you are using.
Frederikke Hansen
2020년 11월 26일
Frederikke Hansen
2020년 11월 26일
Star Strider
2020년 11월 26일
What else is in the
C:\Users\frede\Documents\MATLAB\NMR Project\Alt\Alternative Approach testing\Easy to use\
directory?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
