Reply to topic

Data input/output

besam
Registered Member
Posts
1
Karma
0

Data input/output

Fri Apr 11, 2014 3:24 pm
Hi all,

I recently started using Eigen; I really could not find the following:

1) is there a way to input data from files (txt, xls, dat, etc.) directly into Eigen matrices/vectors?

2) E.g., I have the following .csv file, with the following data appearing in each line:

Den,"MAN GOV","GOV-D7_A","2003-02-28 00:00:00.0","0.023329999297857285","-2.3000058718025684E-4","-0.009762333706021309","2003-03-03 00:00:00.0","ddo",,,
Den,"MAN GOV","GOV-D7_A","2003-03-03 00:00:00.0","0.023169999942183495","-1.5999929746612906E-4","-0.006858092732727528","2003-03-04 00:00:00.0","ddo",,,
.
.
.
nth row.

I need the numerical part (like this: "0.023329999297857285","-2.3000058718025684E-4","-0.009762333706021309","2003-03-03 00:00:00.0") to be stored in a matrix, e.g.:

0.023329999297857285 -2.3000058718025684E-4 -0.009762333706021309
0.023169999942183495 -1.5999929746612906E-4 -0.006858092732727528
.
.
.
nth row.

how could this be done?

Reply to topic

Bookmarks



Who is online

Registered users: andreas_k, Baidu [Spider], Bing [Bot], calzakk, davidemme, Google [Bot], google01103, Heiko Tietze, jstaniek, kamathraghavendra, MichaelTiebesl, MSN [Bot], MSNbot Media, paulus3005, rv8ter, Saabhero, textamoebe, TheraHedwig, veqz, Yahoo [Bot]