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
 Origin Forum
 Matrices manipulation (adding)

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
RafalM Posted - 06/07/2011 : 08:37:36 AM
Origin Ver.: OriginPro 8.0.63.988 SR6 v8.0988;
Operating System: Windows XP

I have 100 matrix data sets which I need to add. Is there some automatic function that would do it, as opposed to adding them manually one by one?

Thanks in advance,
Rafal
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 06/07/2011 : 12:52:35 PM
Hi Rafal,

The following snippet add all existing matrices to a new destination matrix. Here, it assumes all matrices have the same size, and a matrix book contains only one sheet:

/////////////////
string mm$, hh$;
window -d; //duplicate to make same size matrix
%M=%H; //destination mat name
mm$=%M; //same
(%M)=(0); //initialize
%K=""; //formula string
doc -e M {
   hh$=%H; //picked-up matrix
   if(hh$!=mm$) { //exclude destination
    %K=%M+%H; //concat a term to formula
    (%M)=(%K); //evaluation the formula
   }
}
/////////////////

You can run this script by pasting in Script window, highlight all lines, and press ENTER key. Please modify as needed.

--Hideo Fujii
OriginLab

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