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
 Addition of definite parts of two matrix

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
Vertigo81 Posted - 05/04/2010 : 06:54:22 AM
Hello everybody

Following problem:

I have two big (100x100) matrix M1 and M2
and I want to add them, but not the whole ones,
only the columns 2..100 and the rows 3 to 100.

How can I do this?

Thank you
1   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 05/05/2010 : 04:30:36 AM
Currently we have to use Labtalk script to do it. Assume that two matrix objects M1, M2 are in [MBook1]MSheet1!. You can run the following script in the command window.

range M1=[MBook1]MSheet1!1;
range M2=[MBook1]MSheet1!2;
addsheet book:=MBook1 fname:=origin.otm oname:=sname;
range M3=[MBook1]sname$!1;
M3.nrows=98;
M3.ncols=99;
for(i=3; i<=100; i++)
  for(j=2; j<=100;j++)
    M3[i-2, j-1]=M1[i, j]+M2[i, j];

Added results are in the matrix object M3.

Sam
OriginLab Technical Services

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