matrix exponential's, both base and exponent are matrix
이전 댓글 표시
Hi, Is there are simple way to find the exponential when both base and exponent are matrices. Currently I am using a loop.
답변 (1개)
Walter Roberson
2015년 8월 31일
If the matrices are the same size and you want to take corresponding elements, then use
base.^exponent
댓글 수: 6
Preethi
2015년 8월 31일
Walter Roberson
2015년 8월 31일
Are they vectors or are they matrices? What size() should the output be?
Walter Roberson
2015년 8월 31일
result = reshape(bsxfun(@power, base(:), exponent(:).'), [size(base),size(exponent)]);
for example, 3 x 5 and 2 x 2 would come out as 3 x 5 x 2 x 2
John D'Errico
2015년 8월 31일
What meaning would you put to a case where you try to raise a 3x3 matrix to a 2x2 exponent? How could that possibly make sense?
Walter Roberson
2015년 8월 31일
I don't know, John, but there's probably an application for it in String Theory anyhow ;-)
John D'Errico
2015년 8월 31일
I tried reading about string theory once, but I kept losing the thread. I got all tangled up in knots.
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!