MATLAB: Error while using readtable command in MATLAB

readtable

Hi I have one question. I have downloaded one csv template file with .csv extension from Internet. Then I simply converted this .csv file into .dat extension.
filename = fullfile('Desktop','ABC','breslow.dat') %here breslow.dat is my file
Then i try to execute this command :
T =readtable(filename)
when i execute this it shows an error such as:
Error using readtable (line 198)
Unable to open file 'Desktop\ABC\breslow.dat'.
Can anybody help me in this regard ?? Thank you

Best Answer

Hi, I have already checked that my breslow.dat is in the specific folder and it still shows the following error.
>> cd 'C:\Users\Bilal Ahmad\Desktop\ABC'
>> filename = fullfile('Desktop','ABC','breslow.dat')
filename =
'Desktop\ABC\breslow.dat'
C= readtable(filename)
Error using readtable (line 198)
Unable to find or open 'Desktop\ABC\breslow.dat'. Check the path and filename or file permissions.
Note: readtable detected the following parameters:
'Delimiter', ',', 'HeaderLines', 0, 'ReadVariableNames', true, 'Format', ''
It is still showing the error. Can you help me in this regard ??
Related Question