Convolution integral with matrices

2 ビュー (過去 30 日間)
Nicolás Faedo
Nicolás Faedo 2018 年 3 月 28 日
編集済み: Walter Roberson 2019 年 4 月 30 日
Hey everybody! My question is quite simple I guess:
I would like to perform the following convolution integral (written in latex form for the sake of clarity):
, where A is 2x2, B is 2x1 and u is scalar.
I would like to compute this WITHOUT symbolic functions.
So far, this is what I've done:
T = 0:0.01:20 % Assume 20 seconds of simulation.
% Compute the values of expm(A) and B*u for each time step ---------
for i=1:length(T)
tt=t(i);
E(:,:,i) = expm(A*tt);
U(:,i) = B*u(tt);
end
nu = size(A,2); % Assume that A is 2x2.
result2 = 0;
for j=1:nu
AA=squeeze(A(:,j,:));
result2 = result2 + median(diff(T))*conv2(AA,B(j,:),'full');
end
This obtained result is not correct, and I'm struggling to find why.
Thanks!
  1 件のコメント
Niraj Choudhary
Niraj Choudhary 2019 年 4 月 30 日
@Nicolás Faedo have u got the answer?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by