Calculation the integral of the exponential of a matrix
Show older comments
I want to integrate of an exponential of a matrix ( E= exp (Mmat.*(t0-t))). First of all ‘expm’ built-in function in MATLAB has complexity of order N^3 ; while my matrix is a circulant matrix, so I can use a theorem instead that makes complexity of the order of NlogN;
The algorithm is :

( in this algorithm, E=exp(A) which A is a matrix )
By this algorithm I can easily calculate the exp of a matrix but my problem now is the calculation of the integral of this function I mean 
load filem.mat
t0=1e-4;
Mmatt=@(t)Mmat.*(t0-t);
col1=Mmatt(:,1);
FFtcol1=fft(col1);
expFF=exp(FFtcol1);
expMt=ifft(expFF);% the first coulmn of exp (mt)
expMmat(:,1)=expMt;
for x=2:322
expMmat(:,x) = circshift(expMDelt,x-1,1);
end
fun=expMmat*Dmat;
f=integral(fun,0,1e-4,'ArrayValued',true);
I don’t know how can I define it as a function. I can use handle function or function defining in a separate file code but how can I do it. Also I can use integral built in finction in matlab.
Also I think I have an another option and calculate the amount of the function in each time and use the trapz function for integration but I think Integral is more suitable for this situation. I attach my code and the data. I really appreciate any help
thanks in advance
4 Comments
Torsten
on 20 Jul 2021
Did you google
integral of a matrix exponential
?
raha ahmadi
on 20 Jul 2021
Edited: raha ahmadi
on 21 Jul 2021
Torsten
on 20 Jul 2021
E.g. if Mmat is nonsingular, the integral is (expm(t*Mmat) - I)*inv(Mmat)
raha ahmadi
on 21 Jul 2021
Accepted Answer
More Answers (0)
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!