i am trying to read a .dat file but i dont getting any data?

my code is
fid = fopen('20180426_TRH.dat');
A = fscanf(fid, '%c, %f/%f/%f, %f:%f:%f, %f, %f, %f, %f, %f/%f/%f, %f:%f:%f, %f, %f, %f, %f, %f');
fclose(fmlds);
I want to read this file in 1*rows matrics. file format is attached. please help me

 Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de Mayo de 2018
Use textscan() instead of fscanf() .
Also, you need to open the correct file name. And you need to fclose(fid)

Más respuestas (0)

Categorías

Más información sobre Data Import and Export en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 7 de Mayo de 2018

Comentada:

el 14 de Mayo de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by