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.

 采纳的回答

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 个评论

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.
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)
It finally worked out, thank you very much.
Plus it worked really fast.
Which decompress program did you end up using?

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Get 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