help-octave
[Top][All Lists]
Advanced

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

Re: reading data stored in a txt file


From: Jaroslav Hajek
Subject: Re: reading data stored in a txt file
Date: Fri, 9 Jul 2010 13:06:41 +0200

2010/7/9 Jordi Gutiérrez Hermoso <address@hidden>:
> On 9 July 2010 00:26, Nibalart <address@hidden> wrote:
>> I have a a file named crashed.txt and in it are stored 1000 lines like
>> this one
>> 350 275 356 293 315
>> each line has 5 numbers.
>> I have to read all this data a put them in a matrix   1000*5
>
> Try
>
>    v = load("file.data.txt")
>    [v1 v2 v3 v3 v4 v5] = [v(:,1) v(:,2) v(:,3) v(:,4) v(:,5)]
>

Except that the second line won't work :)

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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