How do I do integral of an exponential matrix?
Mostra commenti meno recenti
I am trying to find the integral of an equation that involves exponential matrices and I keep getting an error about "inner matrices must agree". Can any one see how to fix my problem?
Here is my function code: function [ y ] = Qkfunction(x)
F=[0 1 0;0 0 0;0 0 0];
L=[0 0;1 0;0 1];
Qc=[.2 0;0 .1];
dt=.01;
y=(expm(F*(dt-x)))*L*Qc*L'*(expm(F*(dt-x))');
end
and here is my script to take the integral:
dt=.01
Qk=integral(@Qkfunction,0,dt);
disp(Qk);
The error seems to occur with F*(dt-x) in the function but I do not know how to fix it since it should just be a matrix times a constant (dt-x) and not be an issue of matrix multiplication....
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Numerical Integration and Differentiation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!