The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Matrix Templates - Saving Dimensions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

PFuchs

2 Posts

Posted - 12/04/2015 :  04:44:54 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

PFuchs

2 Posts

Posted - 12/04/2015 :  11:20:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Works perfectly, thank you very much!
Go to Top of Page

snowli

USA
1411 Posts

Posted - 12/09/2015 :  11:20:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000