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

4 次查看(过去 30 天)
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