Error using readtable (line 318) Error when I Try to Read in a .dat File

조회 수: 2 (최근 30일)
Cam Pine
Cam Pine 2022년 3월 18일
댓글: Voss 2022년 8월 25일
Hi! I am using this code: filename=uigetfile('.dat'); and data=readtable(filename); however, I am continuing to run into the error: Error using readtable (line 318) Unable to find or open 'Laura Data.dat'. Check the path and filename or file permissions. I attached some helpful screenshots, I would really like to have this issue resolved as I am trying to make some plots with the .dat file. Some help would be incredibly appreciated.

채택된 답변

Voss
Voss 2022년 3월 18일
Try using the second output from uigetfile() as well, in order to refer to the full path of the file selected:
[filename,pathname] = uigetfile('.dat');
data = readtable(fullfile(pathname,filename));
  댓글 수: 3
Femi
Femi 2022년 8월 25일
Hi Please, someone help here
Error using readtable (line 318)
Unable to find or open 'C:\Users\Dev\data\entNames.xlsx'. Check
the path and filename or file permissions.
Voss
Voss 2022년 8월 25일
Does the file 'C:\Users\Dev\data\entNames.xlsx' exist?
Also, please post your code.
It may be that you need to specify the full path properly, as in the original question and answer.

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

추가 답변 (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