How can i calculate e^A*t without using Markov Chain?
Where e=exp , A is a square matrix, and t is a variable

댓글 수: 11

Wayne King
Wayne King 2012년 5월 30일
When you say t is a variable, what do you mean? what is the dimension of t?
Nick
Nick 2012년 5월 31일
ok , t>=0 but this question it is not about how to calculate it on Matlab just to see the result because Elad answer is correct (exp(A.*t)) but i want deeper meaning of the solution.
Walter Roberson
Walter Roberson 2012년 5월 31일
What deeper meaning? It's a formula presented outside of any context. Are you asking for the deeper meaning of why MATLAB uses exp(x) to represent e^x ?
Elad
Elad 2012년 5월 31일
Using the dot after A, means it will multiply each element in the matrix separately.
Walter Roberson
Walter Roberson 2012년 5월 31일
If t is a scalar then using the dot or not using the dot means the same thing. Using the dot makes a difference when neither A nor t are scalar.
Oleg Komarov
Oleg Komarov 2012년 5월 31일
My crystall ball tells me that Nick is looking for a deeeeper meeaninnggg... deeeeeeeperr..
Walter Roberson
Walter Roberson 2012년 5월 31일
Perhaps Nick is data mining? I wonder what he will unearth?
ABCD
ABCD 2016년 9월 29일
Dear Nick, do you mean this?
>> a = [1 2 3 ; 2 5 2; 1 4 3]
a =
1 2 3
2 5 2
1 4 3
>> syms t
>> exp(a*t)
ans =
[ exp(t), exp(2*t), exp(3*t)]
[ exp(2*t), exp(5*t), exp(2*t)]
[ exp(t), exp(4*t), exp(3*t)]
CHENG WEI SHEN
CHENG WEI SHEN 2022년 6월 12일
???
Walter Roberson
Walter Roberson 2022년 6월 12일
Please expand on your question ?
Looking back, I am wondering whether the '*' is intended to represent conjugate transpose, so MATLAB
exp(A' * t)
or perhaps
expm(A' * t)

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

 채택된 답변

Elad
Elad 2012년 5월 30일

1 개 추천

exp(A.*t)

댓글 수: 1

Andika
Andika 2025년 7월 10일
Depending on the context, if you want to compute matrix exponential, you can use the expm function as others had described before.
Starting in R2023b, you can also use the expmv function to calculate the product of a matrix exponential and a vector (which is faster compared to expm). The syntax to do this is F = expmv(A,b,t), which is equivalent to expm(t*A)*b. Here, A is an n-by-n square matrix, b is an n-by-1 column vector, and t is a scalar.

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

추가 답변 (5개)

Kye Taylor
Kye Taylor 2012년 5월 31일

10 개 추천

Use the expm function for computing a matrix exponential

댓글 수: 4

KJ N
KJ N 2017년 11월 9일
To help anyone else coming here: ignore all the other answers saying to use exp. Using expm is the right one for this situation. If you want to compute the matrix exponential e^(A t), where A is a n x n square matrix and t is a variable, and you DO NOT want to do simply do the by-element exponential, i.e., you want to compute the equivalent of the inverse Laplace of s*eye(n)-A, which is important in state-space analysis of linear systems, you want to use expm(A*t), not exp(A*t).
>> A = [0 1; -2 -3]
A =
0 1
-2 -3
>> syms t;expm(A*t)
ans =
[ 2*exp(-t) - exp(-2*t), exp(-t) - exp(-2*t)]
[ 2*exp(-2*t) - 2*exp(-t), 2*exp(-2*t) - exp(-t)]
>> syms s;ilaplace(inv(s*eye(rank(A))-A))
ans =
[ 2*exp(-t) - exp(-2*t), exp(-t) - exp(-2*t)]
[ 2*exp(-2*t) - 2*exp(-t), 2*exp(-2*t) - exp(-t)]
Walter Roberson
Walter Roberson 2017년 11월 9일
Kaleb Nelson, no: the poster said above https://www.mathworks.com/matlabcentral/answers/39854-how-can-i-calculate-e-a-t#comment_82495 that exp(A.*t) is the correct solution.
KJ N
KJ N 2017년 11월 9일
exp() only does computes the exponential of A element-by-element, as shown above like this: >> a = [1 2 3 ; 2 5 2; 1 4 3]
a =
1 2 3
2 5 2
1 4 3
>> syms t
>> exp(a*t)
ans =
[ exp(t), exp(2*t), exp(3*t)]
[ exp(2*t), exp(5*t), exp(2*t)]
[ exp(t), exp(4*t), exp(3*t)]
If that's what you're going for, that's great, but not terribly difficult to compute by hand for even somewhat large n x n matrices with integer elements. However, the original poster said they wanted to avoid using the markov chain (a somewhat onerous process, especially when done by hand for large matrices, even with simple integer values as the elements), leading me to understand they were referring to the matrix exponential, not the element-by-element exponential, hence the correct answer in this case would be to use expm(). I had been looking for the same answer, and Kye Taylor was the only post saying use expm instead of exp, so I thought I would try to ensure those in the future looking for the same answer as myself would be helped by a clarification.
Walter Roberson
Walter Roberson 2017년 11월 9일
We tried a number of times to get the original poster to clarify, but all we got was that they want the exp() solution and that they are looking for a "deeper reason" for something. The poster effectively defined the exp() solution as being the correct one.
Your analysis might well be what the poster really needed, but it is contrary to what little they defined as being correct for their needs.

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

Junsheng SU
Junsheng SU 2017년 11월 28일

6 개 추천

syms t; expm(A*t);
Shenhai
Shenhai 2017년 1월 20일
편집: Shenhai 2017년 1월 20일

3 개 추천

I guess it is not always possible to get the close form solution of exp(At)...
Sometimes I can get result with: exp(At) = iL(sI-A)^-1, where iL is the inverse Laplace transformation, like:
syms s t
A = [0 1;0 0];
expAt = ilaplace(inv(s*eye(size(A,1))-A),s,t);
This will give the result as: [1 t;0 1]
Any other ideas?
Shahram Bekhrad
Shahram Bekhrad 2012년 6월 8일

0 개 추천

As far as I'm aware you probably need it for finding the answer of a state space equation. I myself couldn't find any good function or command yet, so you might have to write a Script file (m-file) and find it. you can use about 3 or 4 way of calculating the said statement. These things are taught in courses like modern control theory. I used the following expression but still have some difficulties. exp(A.t)=I+At+ (At)^2/2! + (At)^3/3!+ (At)^4/4!+. . .
ABCD
ABCD 2016년 9월 29일

0 개 추천

Dear Nick, do you mean this?
>> a = [1 2 3 ; 2 5 2; 1 4 3]
a =
1 2 3
2 5 2
1 4 3
>> syms t >> exp(a*t)
ans =
[ exp(t), exp(2*t), exp(3*t)] [ exp(2*t), exp(5*t), exp(2*t)] [ exp(t), exp(4*t), exp(3*t)]

댓글 수: 1

ABCD
ABCD 2016년 9월 29일
>> a = [1 2 3 ; 2 5 2; 1 4 3]
a =
1 2 3
2 5 2
1 4 3
>> syms t
>> exp(a*t)
ans =
[ exp(t), exp(2*t), exp(3*t)]
[ exp(2*t), exp(5*t), exp(2*t)]
[ exp(t), exp(4*t), exp(3*t)]

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

카테고리

질문:

2012년 5월 30일

댓글:

2025년 7월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by