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
 How to average a part on a 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
cts18488 Posted - 03/03/2025 : 10:41:06 AM
Origin Ver. 2024b
Operating System: Windows 11

Hi,

Is it possible to average part by part a matrix (in an automatic way, even by using consoles (R, Python etc))? and generate a new one with the averages.
For example, in the picture attached I have a 4x4 matrix and I want to reduce it to 2x2 matrix doing averages (every coloured rectangle in the first matrix correspond to highlighted value in the second matrix). The example presented can be done manually, but I have others matrices that are 2048x2048, which would be quite challenging to approach them manually.

Many thanks!
3   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 03/03/2025 : 11:36:12 AM
Yes.

BTW, there are many tools in Origin so it's hard for user to look for features.
We are working on better search menu in 2025b. E.g. with matrix active, I tried typing reduce in search box, Matrix:Shrink shows so user can click it to launch the tool from search result.

Thanks, Snow
cts18488 Posted - 03/03/2025 : 11:08:14 AM
Thank you! It worked. For the averages I have divided by 3 instead of 4 by mistake... I think this strenghtens the idea why it is better in an automatic way...
snowli Posted - 03/03/2025 : 10:51:14 AM
Yes, please use Matrix: Shrink...

Maybe your average result in image is wrong? I got 2.75 and 2.5 on 2nd row.

Thanks, Snow

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