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

1 vue (au cours des 30 derniers jours)
Vishnu Dhakad
Vishnu Dhakad le 7 Mai 2018
Commenté : Vishnu Dhakad le 14 Mai 2018
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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Export dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by