How to load data from DAT file

132 visualizaciones (últimos 30 días)
ALDO
ALDO el 10 de Jun. de 2020
Editada: Walter Roberson el 10 de Jun. de 2020
Hi guys
can someone please help me with extracting data from .dat file. I wanted to attach an example file but it was to big.
I have tried the following codes but was unsuccesful. I would appriciate any input on this. Thanks!
fileID = fopen('example.dat');
OneByte = fread(fileID,'*ubit8');
A=double(OneByte);
%%
[filename directory_name] = uigetfile('*.dat', 'Select a file');
fullname = fullfile(directory_name, filename);
data = load(fullname)
%%
[FileName,PathName] = uigetfile('*.dat');
localdir = dir;
cd(PathName);
load(FileName);
cd('C:\Users\username\Documents\MATLAB\cd');
  4 comentarios
Walter Roberson
Walter Roberson el 10 de Jun. de 2020
Editada: Walter Roberson el 10 de Jun. de 2020
ALDO
ALDO el 10 de Jun. de 2020
This was very helpful. Thank you so much!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by