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; }
|
|
|