Bonjour,

j'ai un format ascci à lire du type :

time time2 X Y Z U I O P R
2019-01-26T21:40:00.299 0.024 180.012 -1296.303 1126.401 -1041.997 -1351.029 1166.636 -921.205 50555550022105
2019-01-26T21:40:05.298 0.025 180.033 -1296.250 1126.395 -1042.025 -1350.978 1166.632 -921.236 50555550022105
j'utilise textscan mais le format date de "time" est original : 2019-01-26T21:40:00.299

j'essaye:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
filename='file.tab' ;
fileID = fopen(filename)
data=textscan(fileID,'%{yyyy-mm-ddTHH:MM:SS}D %d %d %d %d %d %d %d %d %d') ;
mais non

Error using textscan
Unable to read the DATETIME data with the format 'yyyy-mm-ddTHH:MM:SS'. If the data is not a time, use %q to get text data.

Error in readTab (line 11)
data=textscan(fileID,'%{yyyy-mm-ddTHH:MM:SS}D %d %d %d %d %d %d %d %d %d') ;
merci pour toute aide.