Thread Subject: Reading Txt file in Matlab

Subject: Reading Txt file in Matlab

From: Chirackel Yoonus

Date: 20 Jan, 2009 11:34:01

Message: 1 of 3

Hi,

I have a txt document containing some data set with different format in each row. I like to split the data based on number of bytes for each rows. How I can do this in MATLAB?

Thanks
Yoonus

Subject: Reading Txt file in Matlab

From: Chirackel Yoonus

Date: 20 Jan, 2009 11:49:01

Message: 2 of 3

"Chirackel Yoonus" <yoonus@ifmr.ac.in> wrote in message <gl4cr9$8ef$1@fred.mathworks.com>...
> Hi,
>
> I have a txt document containing some data set with different format in each row. I like to split the data based on number of bytes for each rows. How I can do this in MATLAB?
>
> Thanks
> Yoonus
>
this is how my data looks like in txt format
    483110215400441113110100000211 130292 02237069719 002 002 2 320 320 16000 20111
    483110215400441113110200020515212510 20111
    483110215400441113110200010135212517510 20111
    483110215400441113110300980 0025 10000 002 10000 20111
    483110215400441113110300990 00002 0010000000000000000000000000000000020010000 20111
    483110215400441113110409001 2 20 2 20 20111
    483110215400441113110409022 110 110 20111
    483110215400441113110409023 0000130 0000000 0000000 0000130 20111
    483110215400441113110500011 24 3500 00000000 00000000 00000000 00000000 20111
    483110215400441113110500012 00000000 00000000 00000000 00000000 24 3500 20111
    483110215400441113110500111002400003500000000000000000000000000000000000000000000000000 20111
    483110215400441113110500112000000000000000000000000000000000000000000000000002400003500 20111
    483110215400441113110713001 1 90 1 90 20111
    483110215400441113110713016 450 450 20111
    483110215400441113110713017 20 20 20111
    483110215400441113110713022 30 30 20111
    483110215400441113110713023 00000590 00000000 00000000 00000590 20111
    4831102154004411131109000001 012 2 20111
    48311021540044111311100001107912 1000 9922 2400313 15 1000 140 1140 20111
    4831102154004411131112001012 1022 103222012 2022 2032220422205222062220722 23 20111
    4831102154004411131112002082220922210222112 2122221322 23 20111


I need split data from each row using different byte. for example in the first row i like have the data of the form 1-4,5-7,8,9,10-12 like this. for the second row same procedure till 24 byte after that 25-26,27,28-30,31,32 etc

Subject: Reading Txt file in Matlab

From: vedenev

Date: 20 Jan, 2009 12:36:49

Message: 3 of 3

Learn function "textread" and "regexp"

-----------------------------------------
Maxim Vedenev, MATLAB Custom Programming
http://simulations.narod.ru/

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
txt Chirackel Yoonus 20 Jan, 2009 06:35:06
formating Chirackel Yoonus 20 Jan, 2009 06:35:06
rssFeed for this Thread

Contact us at files@mathworks.com