You do not say anything about how these variables get into the workspace, so I am going to a guess that they are all contained in one .mat file, in which case the answer to your question is trivially simple:
If the data are saved/created in some other way, then you please tell us exactly how you got all of those variables into the workspace, and we will show you better methods for handling data.
Best Answer