MATLAB: Decompressing *.7Z Files with MATLAB

gunzip

I have a 7z file. I wish to decompress it using Matlab. How can I do this? The inbuilt matlab functions dont support it.
I have tried,
[status,result] = system(['"C:\Program Files\WinRAR\UnRAR.exe" e ' E:\myFile.7z ' >null']);
however this fails as it gives
result =
UNRAR 5.11 freeware Copyright (c) 1993-2014 Alexander Roshal
E:\myFile.7z is not RAR archive
No files to extract
On closer inspection unrar.exe is not the same as winrar (which can do 7z). Hence i download 7-zip
[status,result] = system(['"C:\Program Files\7-Zip\7z.exe" e ' E:\myFile.7z]);
result =
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Processing archive: E:\myFile.7z
Error: Can not open file as archive
any ideas?
thanks

Best Answer

solved:
[status,result] = system(['"C:\Program Files\7za920\7za.exe" -y x ' '"' filename{f} '"' ' -o' '"' outputDir '"']);
Also, just in case anyone finds it useful, compressing a file with winrar is done by:
[status,result] = system(['"C:\Program Files\WinRAR\Rar.exe" a ' 'C:\Users\user\Desktop\8736_test.rar ' ' C:\Users\user\Desktop\8736.mat' ' >null']);
Related Question