MATLAB Answers

Reading large gz files without unzip

51 views (last 30 days)
Davide on 23 Jun 2015
Commented: Sivakandan Mani on 26 May 2019
I need to go into a very large dataset that is made of many large .gz files (each of 1GB). In the UNIX shell it is possible to explore them without unzipping using the command:
Is there something equivalent for Matlab?


Sign in to comment.

Answers (2)

Jan on 23 Jun 2015
Edited: Jan on 23 Jun 2015
What about
system('gzcat ...')


Davide on 23 Jun 2015
Yes, this is a possibility, nevertheless the "system" command does not generate a stream that Matlab can manage.
Jan on 23 Jun 2015
You want to "explore" the files. So why do you need to create a "stream"?
Davide on 23 Jun 2015
Sorry, probably I did not explain very well what I have to do. It deals with financial data, each gz file has the structure (I am attaching only the first two lines)
#RIC,Date[G],Time[G],GMT Offset,Type,Price,Volume,Bid Price,Ask Price,Exch Time
and I want to, for example, interpolate the column "Price" on a fixed time grid, using previous tick interpolation. So I need to use for loops to operate on the file.

Sign in to comment.

Walter Roberson
Walter Roberson on 23 Jun 2015


Davide on 24 Jun 2015
I'll try, thank you very much.
Sivakandan Mani
Sivakandan Mani on 26 May 2019
Hi Davide,
could you processes your data in matlab,
I have similar kind of problem. If you dont mind could you help me?
With regards,

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by