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

12-Amethyst

## 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

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald II
(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?

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

3 REPLIES 3
23-Emerald II
(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?

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

23-Emerald II
(To:JXBWk)

Slightly different implementation that is ORIGIN independent:

Success!
Luc

12-Amethyst
(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
Check out the latest