Hi,
At present, Origin can't import .mat files as you want above. However, after importing all files, you can execute some scripts to re-organize your variables as a new row.
Now, I suppose your 6 variables all are singe value variables, but not matrices. After importing to Origin, 6 variables in each file are stored in first row of its own workbook. The workbook names are Book1, Book2, Book3, бн. Then run the following scripts in Command Window.
// define six ranges for column 1 to column 6, to store six variables in each file.
range a1 = [book1]sheet1!col(1);
range a2 = [book1]sheet1!col(2);
range a3 = [book1]sheet1!col(3);
range a4 = [book1]sheet1!col(4);
range a5 = [book1]sheet1!col(5);
range a6 = [book1]sheet1!col(6);
// loop from Book2 to Book n, variables in these books all are put to Book1.
for(ii=2;ii<n+1;ii++)
{
range bo = [book$(ii)]; // define a range for Book ii.
// define six ranges for column 1 to column 6 of Book ii.
range b1 = [book$(ii)]sheet1!col(1);
range b2 = [book$(ii)]sheet1!col(2);
range b3 = [book$(ii)]sheet1!col(3);
range b4 = [book$(ii)]sheet1!col(4);
range b5 = [book$(ii)]sheet1!col(5);
range b6 = [book$(ii)]sheet1!col(6);
// put variables in Book ii to Book 1.
a1[ii] = b1[1];
a2[ii] = b2[1];
a3[ii] = b3[1];
a4[ii] = b4[1];
a5[ii] = b5[1];
a6[ii] = b6[1];
delete bo; // delete Book ii.
}
Penn Lai
OriginLab Technical Services