Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
reading .dat file in matlab

Subject: reading .dat file in matlab

From: Saurabh

Date: 12 Oct, 2010 11:13:04

Message: 1 of 2

I have a .dat file in matlab of which first has header information in first six lines
and the rest is data

The task is to determine the dimension of the remaining data set ?
and then to read the data set in same format as it is written

Any suggestions

Subject: reading .dat file in matlab

From: Daniel Armyr

Date: 19 Oct, 2010 13:32:05

Message: 2 of 2

> The task is to determine the dimension of the remaining data set ?
> and then to read the data set in same format as it is written

This is easy. If your data is binary, you use fread() to read out the binary data and then convert it to whatever format it should have. If your data is text, you use textscan() or textread() to read out the information.

--DA

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us