MATLAB 2024a readtable error
조회 수: 28 (최근 30일)
이전 댓글 표시
Error Message:
I have a script using readtable('data.csv') running on MATLAB 2024a that is producing this error if I modify my path from the MATLAB default (set by restoredefaultpath):
Error using readtable (line 517)
inputs must be a string array, character vector, or cell array of character vectors.
Trouble Shooting I've Tried:
If I run restoredefaultpath and then execute T = readtable('data.csv') it runs OK.
T = readtable('data.csv')
It seems like MATLAB can find readtable.m but cannot find readData.m:
which readTable -all` returns C:\Program Files\MATLAB\R2024a\toolbox\matlab\iofun\readtable.m
and
which readData -all returns 'readdata' not found
both with the default path and my modified path.
I've tried uninstalling and then reinstalling MATLAB 2024a to no sucess.
Requested Help:
However, I need to be able to modify my path so that my script can access the m-files it needs. What can I do to fix this problem? Thank you for your help!
댓글 수: 4
Walter Roberson
2024년 8월 21일
That's odd, since clearly the inputs are a cell array of character vectors. The problem must be inside the unescape function.
Good work in tracing it down this far!
채택된 답변
Steven Lord
2024년 8월 21일
Please attempt to reproduce this failure on your machine. If you can, immediately (before running any other command that could throw an error) run the following line of code at the MATLAB Command Prompt (the >>) and show what it displays (and if you could save the variable ME and attach the MAT-file containing it to the post that would be useful too.)
ME = MException.last
The identifier property may help indicate what function caused that error.
My suspicion is that you've written your own string processing function (strcmpi perhaps) or downloaded one that shadows a function built into MATLAB or that ships with it. The lower-case I starting the error message is a bit of evidence that supports that suspicion.
댓글 수: 5
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!