Skip to main content
edited tags
Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405
edited tags
Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405
incorporated additional info from the comments into the question; improved title
Source Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405

How to read a part of huge matrix saved in a TXT file formatted as a list with Readlist, deciding initial and final pointsingle expression?

I havesaved a huge matrix of numbers with dimensions {400, 4001, 2} using Put and got a TXT file formatted in the following way:

{{{1.1, 1.2}, {21.28,4 0.3}, {2.1, 0.7}, <...> },{1257.9, -3.6*^-8}, {1258.2,  -3.4*^-9}}} 

with dimensions {400, 4001, 2}.Actually I would like to know ifhave hundreds of such files. Is there is a smart way to read only a part of it usingthe matrix efficiently? For example, how to take the first 20 or 40 sub-arrays out of 400? Simple ReadListImport or Get on the whole file takes too much time. Do you have any idea?

I attach a link toHere is one of my files:

   filelink.

Any suggestion to better save data in the future is welcome.

How to read a file formatted as a list with Readlist, deciding initial and final point?

I have a TXT file formatted in the following way:

{{{1.1,1.2},{2.2,4.2},... },... } 

with dimensions {400, 4001, 2}. I would like to know if there is a smart way to read only a part of it using ReadList. Do you have any idea?

I attach a link to one of my files:

 file

Any suggestion to better save data in the future is welcome.

How to read a part of huge matrix saved in a TXT file as single expression?

I saved a huge matrix of numbers with dimensions {400, 4001, 2} using Put and got a TXT file formatted in the following way:

{{{1.1, 1.2}, {1.8, 0.3}, {2.1, 0.7}, <...> {1257.9, -3.6*^-8}, {1258.2,  -3.4*^-9}}} 

Actually I have hundreds of such files. Is there a smart way to read only a part of the matrix efficiently? For example, how to take the first 20 or 40 sub-arrays out of 400? Simple Import or Get on the whole file takes too much time.

Here is one of my files:  link.

Any suggestion to better save data in the future is welcome.

added 21 characters in body; edited tags
Source Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405
Loading
added 413 characters in body
Source Link
Loading
Source Link
Loading