From: "baptiste AuguiƩ" Date: 2007-11-25T07:13:12+09:00 Subject: extract consecutive lines of data Hi, A basic question: how to extract several consecutive lines of numbers in a text file (example below) and assign them to some GSL::Matrix in Ruby? text file: > some lines of text ... > .... > more text > below is the data to extract > > 1 2 3 > 4 5 6 > 7 8 9 > 23 7.3e-8 3.4 > > > some more text from which i would like to create three vectors, a=[1, 4, 7, 23], b= [2, 5, 8, 7.33-8], c=[3, 6, 9, 3.4]. The line numbers could be used for indexing if that can help. Many thanks, baptiste