How can I import asc.gz files into matlab?

조회 수: 2 (최근 30일)
Ryan
Ryan 2012년 7월 24일
댓글: Walter Roberson 2017년 6월 13일
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'

답변 (2개)

Walter Roberson
Walter Roberson 2012년 7월 24일
Use gunzip after you have downloaded the file but before you read the content.
  댓글 수: 3
Ryan
Ryan 2012년 7월 25일
Walter- I think I got it. Thanks again for your help.
Walter Roberson
Walter Roberson 2012년 7월 25일
ftp() instead of urlread() I would think.

댓글을 달려면 로그인하십시오.


tuncay tuncay
tuncay tuncay 2017년 6월 13일
How can I access the contents of .gz files with matlab
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 6월 13일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by