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
 How to convert a column of data to multi-column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hearme

China
11 Posts

Posted - 11/05/2003 :  12:56:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.




Go to Top of Page

Mike Buess

USA
3037 Posts

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

hearme

China
11 Posts

Posted - 11/06/2003 :  9:32:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much for your kind helps.
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