Author |
Topic  |
|
hearme
China
11 Posts |
Posted - 11/05/2003 : 12:56:45 AM
|
I want to convert a set of data like this, a, b, c, d, e, f, g, h, i ... to another format like this, a,b,c d,e,f g,h,i ... in the Worksheet automatically. Thanks a lot if you can give me some helps.
Edited by - hearme on 11/24/2003 11:02:03 PM |
|
tib
Switzerland
105 Posts |
Posted - 11/05/2003 : 02:23:02 AM
|
Hi hearme,
you can do it by hand if you copy the data column into a matrix. Create a matrix with 3 columns and enough rows. Then mark the data set and type in the script window e.g. matrix1=data1_a; then choose with the matrix active from the menubar edit | convert matrix | direct this works in Origin7SR4.
If you want to do this automatically you probably need some LabTalk programming. As a starting point you could use the following script:
win -t mat; // open new matrix; matrix -ps DIM 3 100; // set dimensions; (%H)=data1_a; // copy dataset into matrix; matrix -id; // check convert to data; mat.matname$ = %H; win -T wks; // new worksheet; mat.wksname$ = %H; mat.m2w(); // convert matrix to worksheet;
I am sure somebody else knows a more elegant way. But I hope this helps for the time being. Tilman.
|
 |
|
Mike Buess
USA
3037 Posts |
Posted - 11/05/2003 : 08:54:04 AM
|
If your worksheet has only one column you can do this from the Edit menu.
1. Select Edit->Convert to Matrix->Expand Columns 2. Enter 3 in the "Expand for every row" dialog 3. Select Edit->Convert to Worksheet->Direct
This does the same thing that Tilman suggested but you don't need to enter anything in the script window. The down side is that you have to delete extra columns in the starting worksheet.
Mike Buess Origin WebRing Member |
 |
|
hearme
China
11 Posts |
Posted - 11/06/2003 : 9:32:24 PM
|
Thank you very much for your kind helps. |
 |
|
|
Topic  |
|
|
|