Author |
Topic  |
|
PFuchs
2 Posts |
Posted - 12/04/2015 : 04:44:54 AM
|
Hello,
I'm using Origin 2016G (64 bit), b9.3.226 on Windows 7 x64.
I want to use matrix templates in order to import many datasets, but it fails using the settings from the "matrix dimensions / header" dialog.
I prepare a matrix exactly how I want it, especially the xy-mapping is important for me. Then I choose "File" -> "Save as Template" and save the prepared matrix as a template.
But If I now create a new matrix, select "File" -> "Import" -> "Single ASCII" and select the created template, the imported matrix has not the xy-mapping from the template.
What am I doing wrong?
Philipp |
|
snowli
USA
1411 Posts |
Posted - 12/04/2015 : 10:27:13 AM
|
When importing matrix, there is no xy mapping info. so Origin will auto adjust the xy mapping based on size of data (rows x columns)
Here is what you can do to keep a fixed xy mapping.
Open a new Matrix window. File: IMport Single ASCII. In the dialog that asks you to picke the data file, check the Show Options checkbox. Pick the file you want to import and click Open. In the dialog that opens, Expand the Script node. Enter the following to "Script After All Files Imported" (2nd box). This exmaple will set xy mapping to be from 1 to 100. matrix -ps X 1 100; matrix -ps Y 1 100;
Click OK to import. If you choose View: Show X/Y, u can see the xy mapping is 1 to 100.
Save this matrix as template for future use.
Thanks, Snow |
 |
|
PFuchs
2 Posts |
Posted - 12/04/2015 : 11:20:08 AM
|
Works perfectly, thank you very much! |
 |
|
snowli
USA
1411 Posts |
Posted - 12/09/2015 : 11:20:27 AM
|
Hi Philipp,
We are thinking of how to improve this so we'd like to know 1. Do all your data have same number of columns and rows? 2. When importing, do you want to keep the xy mapping no matter how many rows and numbers of data. 3. Also is there cases, based on the xy mapping you set in template, when importing new data with different number of rows/columns, you want to keep x increment and y increment so the xy mapping may be changed. (Start x/y value kept and using the increment calculated bythe sheet's original xy mapping)
Thanks, Snow |
 |
|
|
Topic  |
|
|
|