필터 지우기
필터 지우기

Efficient way of calculation matrix exponential in matlab

조회 수: 5 (최근 30일)
Hayao
Hayao 2015년 11월 12일
댓글: Walter Roberson 2016년 8월 4일
I am currently trying to solve a matrix exponential of a matrix that has the form of
[a 0 b 0]
[0 c 0 d]
[e 0 f g]
[0 h i j]
This is obviously not symmetry, and I am very sure this is hard to solve.
1)Is there a way to solve this more time efficiently on Matlab?
2)How complicated of a matrix can Matlab solve for matrix exponential? (I know "complicated" is a very qualitative word, but I really have no other way of expressing this)
3)How exactly do MATLAB try to solve matrix exponential?
  댓글 수: 1
Pawel Tokarczuk
Pawel Tokarczuk 2016년 8월 4일
You shouldn't use "i" or "j" as symbols because those are interpreted as imaginary units - just try typing one or the other at the command line to see the point.

댓글을 달려면 로그인하십시오.

채택된 답변

John D'Errico
John D'Errico 2015년 11월 12일
If your matrix is symbolic, expect it to be difficult, and incredibly nasty looking even if you could obtain a solution. You might think that this should be easy, but to no surprise, it is not a trivial thing to compute. Even the simple case of the matrix exponential of a general 2x2 matrix is a bit of a mess. A 3x3 matrix exponential is right now completely bogging down one of the cores of my cpu in a test case.
If your matrix is purely numeric, so you have values for those elements, then it is trivial. Use expm.
Just wanting code to be more efficient is not sufficient. There is no magic to be found, unless your name is Harry Potter.
  댓글 수: 11
Walter Roberson
Walter Roberson 2015년 11월 24일
185 hours so far and there is no sign that it is getting closer to finding the solution. You need to confirm soon that you need me to keep running it and you need to tell me which output format you need the answer it.
Walter Roberson
Walter Roberson 2016년 8월 4일
(Eventually I gave up and canceled the calculation.)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Star Strider
Star Strider 2015년 11월 12일
I do not know what you intend by ‘solve a matrix exponential’. The expm function will calculate the matrix exponential, and the logm function is the inverse. These functions also are in the Symbolic Math Toolbox if you are doing a symbolic calculation.
  댓글 수: 2
Hayao
Hayao 2015년 11월 12일
I left out few words in my question which completely changes the question. I apologize.
What I meant was I wanted to solve matrix exponential of a matrix shown above.
I know that I am supposed to use expm, but it is super time-consuming.
Star Strider
Star Strider 2015년 11월 12일
I know I can’t write any more efficient code than expm, so I can’t offer any further help.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by