I would like to save workspace variables to a .mat file and then open them up in Origin. Is there a way to control the order in which the variables appear in Origin's columns? Alternatively, how does MATLAB choose the column order when saving workspace variables? The variables (all vectors) I'm using have a variety of naming patterns and sizes (1 to 10,000 rows). I haven't found a reliable scheme as to how MATLAB orders these variables.
An example of the code I'm using is listed below:
SampleData_1 = (1:200)';SampleData_2 = (1:2:200)';SampleData_3 = (1:10:5000)';save 'ExportTest.mat' SampleData_1 SampleData_2 SampleData_3;
After importing ExportTest.mat into Origin, the following variables appear from left to right: SampleData_1, SampleData_2 and SampleData_3. Can I force it to appear from left to right: SampleData_3, SampleData_1 and SampleData_2?
Best Answer