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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 How to average a part on a matrix
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cts18488

United Kingdom
85 Posts

Posted - 03/03/2025 :  10:41:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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!

snowli

USA
1411 Posts

Posted - 03/03/2025 :  10:51:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cts18488

United Kingdom
85 Posts

Posted - 03/03/2025 :  11:08:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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...
Go to Top of Page

snowli

USA
1411 Posts

Posted - 03/03/2025 :  11:36:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000