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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 transpose

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
shyamigcar2 Posted - 06/07/2017 : 10:54:42 AM
I wanted to transpose certain data in column 1 from 4 row to 15 row
starting from 4 row 2 column.

ie., I wanted to transpose certain ranage of row string data.
4   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 06/13/2017 : 12:57:47 PM
Hello,

Those menu -e execute command same as you choose Origin's menus.
Each menu has its menu ID. U can see this page for how to find menu -d and how to run them by menu -e.
http://www.originlab.com/doc/LabTalk/ref/Menu-cmd#-e.3B_Execute_the_menu_command_with_the_specified_ID

Actually there is a menu ID correspoinding for Edit: Paste Transpose. So you can run
menu -e 36455; to directly paste transpose. No need to run wtranspose.



Another way is define range variable for the range in column you want to copy. And then define another range for the the row where you want to paste to.

This only works if you are copying in a single column and paste to a single row.

E.g.
range -v r1 = A[4]:A[15]; //define a range varaible r1 for row 4 to 15 of column A
newsheet; //start a new sheet
wks.ncols=r1.GetSize(); //set number of columns to be size of rows in r1
range -v r2=A[1]:L[1]; //define r2 to be 1st row
r2=r1; //assign values in r1 to r2


More info. about range -v
http://www.originlab.com/doc/LabTalk/guide/Range-Notation#Option_Switch_-vOption_Switches

Thanks, Snow
shyamigcar2 Posted - 06/13/2017 : 10:47:02 AM
Hai Fuji

I do not understand menu -e in the command lines.

Thank you

S Shyam Kumar
Hideo Fujii Posted - 06/08/2017 : 4:34:35 PM
Hi,

Using Yuki's wtranspose x-function, you can make a code like following:
col1=2; row1=3;  //block's top left corner: column# row#
col2=4; row2=5;  //block's bottom right corner: column# row#
worksheet -s col1 row1 col2 row2;  //select specifiled block
menu -e 57634; //copy
newbook;       //make output sheet
worksheet -s 1 1 1 1;  //select 1st col, 1st row
menu -e 57637; //paste
wtranspose;    //transpose
Hope this helps.

Hideo Fujii
OriginLab
yuki_wu Posted - 06/07/2017 : 10:10:23 PM
Hi,

Origin has an X-Function for transposing worksheet data: wtranspose. Please take a look at this knowledge base item and see if this applies to you:
http://www.originlab.com/doc/X-Function/ref/wtranspose

Regards,
Yuki
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000