How can I import asc.gz files into matlab?

1 visualización (últimos 30 días)
Ryan
Ryan el 24 de Jul. de 2012
Comentada: Walter Roberson el 13 de Jun. de 2017
I need to get files from this directory: <ftp://sidads.colorado.edu/pub/DATASETS/NOAA/G02156/24km/2011/> into MATLAB however when I use URLREAD, it incorrectly reads in each file. Instead of reading in what should approximately be a 6400x6400 array, it reads in a supposed "1x24331" dimensional array something like this when I open up the variable: ')>N'

Respuestas (2)

Walter Roberson
Walter Roberson el 24 de Jul. de 2012
Use gunzip after you have downloaded the file but before you read the content.
  3 comentarios
Ryan
Ryan el 25 de Jul. de 2012
Walter- I think I got it. Thanks again for your help.
Walter Roberson
Walter Roberson el 25 de Jul. de 2012
ftp() instead of urlread() I would think.

Iniciar sesión para comentar.


tuncay tuncay
tuncay tuncay el 13 de Jun. de 2017
How can I access the contents of .gz files with matlab
  1 comentario
Walter Roberson
Walter Roberson el 13 de Jun. de 2017
gunzip the files.
There is no direct facility in MATLAB to access individual files within a .gz archive.
If you know a bit of Java, it is possible to place calls to appropriate java routines.

Iniciar sesión para comentar.

Categorías

Más información sobre Low-Level File I/O en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by