Calculate the sum of the elements of an elementwise product of two matrices in Maxima
up vote
1
down vote
favorite
What's in the title and I've tried thus far:
sum(lambda([i,j], M[i,j] * Ma[i,j]))
This expression gives me the Wrong number of arguments
error. Doesn't sum()
operate on lists, or am I missing something like an expression in the sum
function call?
matrix sum product maxima
add a comment |
up vote
1
down vote
favorite
What's in the title and I've tried thus far:
sum(lambda([i,j], M[i,j] * Ma[i,j]))
This expression gives me the Wrong number of arguments
error. Doesn't sum()
operate on lists, or am I missing something like an expression in the sum
function call?
matrix sum product maxima
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
What's in the title and I've tried thus far:
sum(lambda([i,j], M[i,j] * Ma[i,j]))
This expression gives me the Wrong number of arguments
error. Doesn't sum()
operate on lists, or am I missing something like an expression in the sum
function call?
matrix sum product maxima
What's in the title and I've tried thus far:
sum(lambda([i,j], M[i,j] * Ma[i,j]))
This expression gives me the Wrong number of arguments
error. Doesn't sum()
operate on lists, or am I missing something like an expression in the sum
function call?
matrix sum product maxima
matrix sum product maxima
asked Nov 19 at 15:04
TheSodesa
16210
16210
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Turns out the answer was rather simple:
lsum(i,i, list_matrix_entries(M3 * Ma))
This essentially translates to (sum_{iin{set of the elements of M*Ma}} i) in LaTeX.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Turns out the answer was rather simple:
lsum(i,i, list_matrix_entries(M3 * Ma))
This essentially translates to (sum_{iin{set of the elements of M*Ma}} i) in LaTeX.
add a comment |
up vote
1
down vote
Turns out the answer was rather simple:
lsum(i,i, list_matrix_entries(M3 * Ma))
This essentially translates to (sum_{iin{set of the elements of M*Ma}} i) in LaTeX.
add a comment |
up vote
1
down vote
up vote
1
down vote
Turns out the answer was rather simple:
lsum(i,i, list_matrix_entries(M3 * Ma))
This essentially translates to (sum_{iin{set of the elements of M*Ma}} i) in LaTeX.
Turns out the answer was rather simple:
lsum(i,i, list_matrix_entries(M3 * Ma))
This essentially translates to (sum_{iin{set of the elements of M*Ma}} i) in LaTeX.
answered Nov 19 at 15:39
TheSodesa
16210
16210
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53377414%2fcalculate-the-sum-of-the-elements-of-an-elementwise-product-of-two-matrices-in-m%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown