Matrix Multiplikation Speed Up

Hello, I would like to speed up this code, any sugestions
Rm, Zm and Cm are 1700x1700
f = linspace(1e3,5e6,750); % Hier gibt man den Frequenzbereich an
w = 2*pi*f';
parfor k=1:length(f)
Zm = Rm+w(k)*1i*Lm;
Gama = Kk*(Zm\Kkt);
YYn = w(k)*1i*Cm + Gama;
Zn = inv(YYn);
Amp(k) = abs(1-Zn(jj,1)/Zn(1,1));
end
I do not have a GPU

4 件のコメント

Joss Knight
Joss Knight 2019 年 8 月 16 日
編集済み: Joss Knight 2019 年 8 月 16 日
What is Kkt? What is jj?
Matthias Schneider
Matthias Schneider 2019 年 8 月 19 日
編集済み: Matthias Schneider 2019 年 8 月 19 日
Sorry I forgot to mention what Kk, KKt and jj are. Kk ist an transformations Matrix, and Kkt = Kk', jj is the index of an outer for loop.
a = 1700
Kk=eye(a);
for i=1:(a-1)
Kk(i+1,i)=-1;
end
this little pice of code describes how Kk is built, but the Kk is built only once and is the used over and over again.
madhan ravi
madhan ravi 2019 年 8 月 19 日
a?
Joss Knight
Joss Knight 2019 年 8 月 21 日
Sorry, nothing occurs to me. You take the trouble to invert YYn but then only use a single row of it, so maybe you could focus on that piece of algebra.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEigenvalues & Eigenvectors についてさらに検索

製品

リリース

R2019a

質問済み:

2019 年 8 月 16 日

コメント済み:

2019 年 8 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by