cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Quickest way of summing all the number in a matrix in mcad15?

JXBWk
14-Alexandrite

Quickest way of summing all the number in a matrix in mcad15?

To all

 

What is the quickest way summing all the data in matrix in mcad 15?

I have a matrix of N columns

I want to sum all the number in the following colums

1&2

3&4

5&6

Etc

There are Nrow

ultimatly the number of columns will be “dynamic” but will always be a multiple of 6

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:JXBWk)


@JXBWk wrote:

To all

 

What is the quickest way summing all the data in matrix in mcad 15?

I have a matrix of N columns

I want to sum all the number in the following colums

1&2

3&4

5&6

Etc

There are Nrow

ultimatly the number of columns will be “dynamic” but will always be a multiple of 6


Do you mean something like shown below?

 

2022 05 20 a.png

 

It should work for any matrix with an even number of columns.  The above is written in Prime 7, but the M15 equivalents should work.

 

Stuart

View solution in original post

3 REPLIES 3
StuartBruff
23-Emerald III
(To:JXBWk)


@JXBWk wrote:

To all

 

What is the quickest way summing all the data in matrix in mcad 15?

I have a matrix of N columns

I want to sum all the number in the following colums

1&2

3&4

5&6

Etc

There are Nrow

ultimatly the number of columns will be “dynamic” but will always be a multiple of 6


Do you mean something like shown below?

 

2022 05 20 a.png

 

It should work for any matrix with an even number of columns.  The above is written in Prime 7, but the M15 equivalents should work.

 

Stuart

LucMeekes
23-Emerald III
(To:JXBWk)

Slightly different implementation that is ORIGIN independent:

LucMeekes_0-1653053942229.png

Success!
Luc

JXBWk
14-Alexandrite
(To:LucMeekes)

Thanks @StuartBruff and @LucMeekes for the suggestions. It works but I realised that there is a slight difference to what I actually needed (I just need to work on a transposed matrix !)

Announcements

Top Tags