help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specific fixed width question...


From: fork
Subject: Re: Specific fixed width question...
Date: Wed, 15 Sep 2010 16:43:56 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

CdeMills <Pascal.Dupuis <at> worldonline.be> writes:

> 
>  regexp('WA 053 011 Clark County             45 ', '\d+', 'match')
> ans =
> 
> {
>   [1,1] = 053
>   [1,2] = 011
>   [1,3] = 45
> }
> 
> Could it be more simple ? 

Well, sure, there could be more syntactical sugar like awk for dlmread, plus
there is still the intermediate step of changing the above parsed data into a
matrix.  Intuitive and a single line is always better than sort of intuitive and
four lines.

It's all good, though, especially the fact that Octave does the right thing over
multiple rows and columns. 

Tx



reply via email to

[Prev in Thread] Current Thread [Next in Thread]