Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
Cam Pine
Cam Pine le 18 Mar 2022
Commenté : Voss le 25 Août 2022
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.

Réponse acceptée

Voss
Voss le 18 Mar 2022
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 commentaires
Femi
Femi le 25 Août 2022
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 le 25 Août 2022
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by