How to find State Transition Matrix in terms of sin and cos if eigenvalues are Complex Conjugate?

조회 수: 20 (최근 30일)
Hello,
I am trying to find State Transition Matrix (STM) in MATLAB using "expm(A*t)" command. For real roots, its fine, but when its complex eigenvalues, its going into piecewise mode and not giving the STM in terms of sin or cosine.
A = [0 1 0; 0 0 1; -2 -3 -5];
syms t;
A_STM = expm(A*t)
For this I am getting following STM in truncated form as attached (One Real and Two Complex Conjugate):
But I want answer in the following form (Not for above example), from MATLAB -
Can somebody guide, help?
Thank you.

채택된 답변

Star Strider
Star Strider 2021년 3월 23일
Use the rewrite function, then simplify:
A = [0 1; -2 -2];
syms t;
A_STM = expm(A*t)
A_STM = rewrite(A_STM, 'sincos')
A_STM = simplify(A_STM, 500)
producing:
A_STM =
[2^(1/2)*exp(-t)*sin(t + pi/4), exp(-t)*sin(t)]
[ -2*exp(-t)*sin(t), 2^(1/2)*exp(-t)*cos(t + pi/4)]
in LaTeX:
.
  댓글 수: 6

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by