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
 Matrix copy

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
DataConv Posted - 10/29/2013 : 05:35:39 AM
Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0G SR2
Operating System: W7 Pro SP1

I have created a matrix with a single sheet, but multiple layers (e.g. all the same dimension but different data). Since the different layer contain different data, i also adjusted the data type of each layer. I now want to copy the matrix 'as is' to do some data processing without loosing the original one. So i use the 'mcopy' X-function. But even with the 'fullcopy' Option, the data type (!) is not kept. That is bad especially for complex numbers. Okay - i could split to real and imaginary first, then do the copy - but that is just a work-around.
Any ideas?

Example:
MBook1->MSheet1->{(1):double,(2):double,(3):complex,(4):int}
gets
MBook1->MSheet2->{(1):double,(2):double,(3):double,(4):double}
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 10/30/2013 : 10:57:47 AM
Technically, the sheet ( in a matrixbook or workbook ) is the layer and the data is stored in an object in the sheet ( a column in a worksheet or object in a matrixsheet ).

The mcopy X-Function works at the object level and should preserve the data formatting.

This should work:

mcopy im:=[MBook1]MSheet1!1 om:=[MBook1]MSheet2!1 fullcopy:=1;
mcopy im:=[MBook1]MSheet1!2 om:=[MBook1]MSheet2!2 fullcopy:=1;
mcopy im:=[MBook1]MSheet1!3 om:=[MBook1]MSheet2!3 fullcopy:=1;
mcopy im:=[MBook1]MSheet1!4 om:=[MBook1]MSheet2!4 fullcopy:=1;

as should this:

range raM = [MBook1]MSheet1;
loop(ii,1,raM.nmats) // nmats is the number of objects in a matrix sheet
{
mcopy im:=[MBook1]MSheet1!$(ii) om:=[MBook1]MSheet2!$(ii) fullcopy:=1;
}

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