无论如何,我可以在MATLAB中提取.Z
文件的内容吗?我已经尝试过MATLAB函数unzip
,gunzip
和untar
,但没有任何对我有用。
答案 0 :(得分:0)
编写调用Linux / Windows命令的Matlab函数(在本例中为uncompress name.z
)有什么问题?在Linux上,类似这样:
function uncompress(filename)
str = ['uncompress', ' ', filename]; % note the blank
system(str);
在Windows上,您可以使用7zip:
function uncompress(filename)
path_to_7z='C:\Program Files\7-Zip\7z.exe'; % adapt to your path
str = [path_to_7z, ' ', filename]; % note the blank
system(str);
现在您可以使用Matlab的全新解压缩功能:
>>uncompress('file_to_uncompress.z')