If you don't want to save everything in your workspace, then don't save everything in your workspace. It really is that simple.
Read thesave documentation, and you will find lots of options for selecting which variables to save, e.g. to save the two variablefoo andbaz, you would do this:
save('filename.mat','foo','baz')
save can also match variable names by regular expressions: read the doc to know more.
Best Answer