Keiker74
Structural
- Jun 8, 2005
- 8
Does anyone know how I can add all the values in a i,j matrix. I want my program to generate a matrix using the following:
i =: 1..n
j =: 1..m
Matrices can be created for numerous values of n and m. An example is shown below:
L(i,j) = i*j
Where i and j are the indices, not functions for L. This creates a create a n x m matrix which is what I want but I want my MathCAD program to sum all values in the Matrix L for various i and j values. For instance if n=2 and m=2,
L = [ 1 2:
2 4]
I want my value for the sum equal to 1 + 2 + 2 + 4 = 9.
Note I set my Array Origin to 1. Any help would be greatly appreciated.
i =: 1..n
j =: 1..m
Matrices can be created for numerous values of n and m. An example is shown below:
L(i,j) = i*j
Where i and j are the indices, not functions for L. This creates a create a n x m matrix which is what I want but I want my MathCAD program to sum all values in the Matrix L for various i and j values. For instance if n=2 and m=2,
L = [ 1 2:
2 4]
I want my value for the sum equal to 1 + 2 + 2 + 4 = 9.
Note I set my Array Origin to 1. Any help would be greatly appreciated.