This is easy with the GUI of e.g. 7zip. But do you want to do this inside Matlab? Then what exactly is the problem?
zip('first.zip', {'2.m', '3.m'});
zip('second.zip', {'4.m', '5.m'});
zip('third.zip', {'1.m', 'first.zip', 'second.zip'});
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!