Error while using function readtable()
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I use function readtable to read a txt file, it works well before, but suddenly it don't works anymore and return the error:
>> a2=readtable('dyw_e_u.txt');
Error using readtable
inputs must be a string array, character vector, or cell array of character vectors.
>> a2=readtable("dyw_e_u.txt");
Error using readtable
inputs must be a string array, character vector, or cell array of character vectors.
I think what I input 'dyw_e_u.txt' is a character vector, I don't understand why it return the error, please help, thanks
My text file is like this:
Lat Lon mm.dd.yyyy hh:mm:ss U(m^2/s) V(m^2/s) u(cm/s) v(cm/s) Depth(m)
22.4189 114.9908 2021/5/31 0:00:00 -1.123 1.949 -4.16 7.22 26.993
22.4189 114.9908 2021/5/31 1:00:00 -0.452 1.484 -1.675 5.497 26.993
22.4189 114.9908 2021/5/31 2:00:00 0.361 1.06 1.338 3.926 26.993
22.4189 114.9908 2021/5/31 3:00:00 0.994 0.838 3.684 3.104 26.993
22.4189 114.9908 2021/5/31 4:00:00 1.353 0.544 5.014 2.017 26.993
22.4189 114.9908 2021/5/31 5:00:00 1.597 -0.203 5.917 -0.754 26.993
22.4189 114.9908 2021/5/31 6:00:00 1.916 -1.429 7.097 -5.293 26.993
22.4189 114.9908 2021/5/31 7:00:00 2.289 -2.645 8.482 -9.798 26.993
22.4189 114.9908 2021/5/31 8:00:00 2.466 -3.196 9.137 -11.84 26.993
9 comentarios
Walter Roberson
el 12 de Oct. de 2023
I suggest you use
dbstop if error
and run your code, and then when it stops at the error line, start working backwards to trace the cause.
Respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!