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:
read data

Subject: read data

From: Rik Brey

Date: 14 Sep, 2010 14:07:56

Message: 1 of 4

hey,

i'm new here and english isn't my mother tongue, but i hope you can
understand und help me.

i have a file (data.asc) and i want to import this. the problem is, it
has a headline and i don't know how much columns are in the file.
further i only need the first column and than every even column (2, 4,
6, ..., n).

how can i solve this with matlab?

thanks
Rik

Subject: read data

From: Rik Brey

Date: 14 Sep, 2010 14:11:29

Message: 2 of 4

hey, i forgot to tell, that the columns are separated by a tab.

Am 14.09.2010 16:07, schrieb Rik Brey:
> hey,
>
> i'm new here and english isn't my mother tongue, but i hope you can
> understand und help me.
>
> i have a file (data.asc) and i want to import this. the problem is, it
> has a headline and i don't know how much columns are in the file.
> further i only need the first column and than every even column (2, 4,
> 6, ..., n).
>
> how can i solve this with matlab?
>
> thanks
> Rik

Subject: read data

From: Sean

Date: 14 Sep, 2010 14:15:30

Message: 3 of 4

Rik Brey <rik.brey@s2007.tu-chemnitz.de> wrote in message <i6nvjt$leu$1@bruford.hrz.tu-chemnitz.de>...
> hey,
>
> i'm new here and english isn't my mother tongue, but i hope you can
> understand und help me.
>
> i have a file (data.asc) and i want to import this. the problem is, it
> has a headline and i don't know how much columns are in the file.
> further i only need the first column and than every even column (2, 4,
> 6, ..., n).
>
> how can i solve this with matlab?
>
> thanks
> Rik

Is it comma delimited? If so:
>>help csvread
else:
>>help textscan

Subject: read data

From: Rik Brey

Date: 14 Sep, 2010 14:48:01

Message: 4 of 4

The problem, that i can not solve is that i do not know how much columns
i have and when i use textscan, i have to say how much colums i have.

Am 14.09.2010 16:15, schrieb Sean:
> Rik Brey <rik.brey@s2007.tu-chemnitz.de> wrote in message
> <i6nvjt$leu$1@bruford.hrz.tu-chemnitz.de>...
>> hey,
>>
>> i'm new here and english isn't my mother tongue, but i hope you can
>> understand und help me.
>>
>> i have a file (data.asc) and i want to import this. the problem is, it
>> has a headline and i don't know how much columns are in the file.
>> further i only need the first column and than every even column (2, 4,
>> 6, ..., n).
>>
>> how can i solve this with matlab?
>>
>> thanks
>> Rik
>
> Is it comma delimited? If so:
>>> help csvread
> else:
>>> help textscan

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