T O P I C R E V I E W |
jdwatson |
Posted - 06/16/2011 : 4:04:18 PM 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!
|
1 L A T E S T R E P L I E S (Newest First) |
greg |
Posted - 06/17/2011 : 09:53:23 AM 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
|
|
|