I need to unzip files automatically in my matlab and when I use the unzip function, I can't unzip a file ending in .sp3.zip.
I need a solution, being able to use some external command, anything, however, needs to be fast because I will work with a large volume of data.
Attached is an example of the data I'm trying to unzip and can't.

 採用された回答

Walter Roberson
Walter Roberson 2021 年 6 月 16 日

1 投票

The file is not zip and is not gzip either.
If you happen to be using Mac or Linux, then rename the file to end with .Z and then use the system uncompress utility
!cp igs18143.sp3.zip igs18143.sp3.Z
!uncompress *.Z

5 件のコメント

Clodoaldo de Souza Faria Júnior
Clodoaldo de Souza Faria Júnior 2021 年 6 月 17 日
I don't use linux, I use Windows 10.
And this file, I can unzip it manually, but via code I can't and I really need this to be done automatically to proceed with my code.
Walter Roberson
Walter Roberson 2021 年 6 月 17 日
I suspect that 7zip could handle the files.
Download 7zip
  • install 7z in your machine
  • set the path in Environment Variables -> User Variables path -> edit -> new (add the path - C:\ProgramFiles\7-Zip) -> OK
Once the above is done then inside matlab
filename = 'igs18143.sp3.zip'
cmd = sprintf('7z.exe e "%s"', filename)
[status, msg] = system(cmd)
Clodoaldo de Souza Faria Júnior
Clodoaldo de Souza Faria Júnior 2021 年 6 月 17 日
It finally worked out, thank you very much.
Plus it worked really fast.
Walter Roberson
Walter Roberson 2021 年 6 月 17 日
Which decompress program did you end up using?
Clodoaldo de Souza Faria Júnior
Clodoaldo de Souza Faria Júnior 2021 年 6 月 17 日
I used 7-zip

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

製品

リリース

R2018a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by