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
 Analysis templates and matrices
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jdwatson

3 Posts

Posted - 06/16/2011 :  4:04:18 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR6
Operating System: Win7

So I just worked through the custom report sheet tutorial in Origin 8.0, and I'm wondering if there is a way to create a template with matrices that will work with the import wizard to import multiple data files at a time. The process I'm trying to streamline is as follows: import a single column file of z values (that correspond to an evenly spaced 43x43 xy grid), use the "expand" option in convert to matrix, change the xy range in the matrix to +-.1 (the default is set at 1 to 10 for some reason), and plot the data as a contour plot.

If I could somehow embed the matrix in a tab of the workbook, I could just link everything together like in the tutorial, and then if I imported multiple files it would also create multiple matrices. However, I can't find a way to do this - does anyone have any ideas? Thanks!

greg

USA
1378 Posts

Posted - 06/17/2011 :  09:53:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Some details of what you are trying to do are not clear, but here is one possibility:

Since you know your X,Y data, create a two-column worksheet with the data already filled in. You can use Set Column Values with
(int((i-1)/43)-21)/210
and
(mod((i-1),43)-21)/210
for 1849 rows to create the X,Y data.

Then use the Import Wizard to import in "Start New Columns" mode and on the Save Filters page, Save the filter "In the Window", check the "Specify advanced filter options" and on the next page include this script:
// BEGIN SCRIPT
wks.col3.type=6; // Set new column as Z
wo -s 3 0 3 0; // Select it
run.section(Plot3D,ContourColor); // Plot XYZ Contour
// END SCRIPT
When you are done, delete the Z column and save the Worksheet window as ZPlot.ogw.

Now you can automate import and plotting using this:
// BEGIN SCRIPT
dlgfile gr:=*.* mu:=1;
loop(ii,1,fname.GetNumTokens(CRLF))
{
string strFile$ = fname.GetToken(ii,CRLF)$;
doc -a ZPlot.ogw;
impfile fname:=strFile$ location:=page;
}
// END SCRIPT

Edited by - greg on 06/17/2011 09:54:17 AM
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