How I can download lfgauss.m, lfnewton.m, lfybus.m, busout.m, busflow.m?

49 ビュー (過去 30 日間)
huong vy
huong vy 2018 年 10 月 16 日
回答済み: Hiren Vora 2020 年 10 月 18 日
fgauss.m, lfnewton.m, lfybus.m, busout.m, busflow.m?

回答 (2 件)

Steven Lord
Steven Lord 2018 年 10 月 16 日
Searching the MathWorks website for "lfgauss" found two hits. One is this question, the other is this question which contains code in the one older comment for the accepted Answer. You'll need to click the "Show 1 older comment" link to see it.
  2 件のコメント
huong vy
huong vy 2018 年 10 月 16 日
I still can't to know how to download them, can you help me!
Steven Lord
Steven Lord 2018 年 10 月 16 日
Copy and paste them from that comment into a new file in the MATLAB Editor.

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


Hiren Vora
Hiren Vora 2020 年 10 月 18 日
% This program evaluate th Bus Admittance Matrix for power flow solution
j=sqrt(-1);
i = sqrt(-1);
nl = linedata(:,1);
nr = linedata(:,2);
R = linedata(:,3);
X = linedata(:,4);
Bc = j*linedata(:,5);
a = linedata(:, 6);
nbr=length(linedata(:,1));
nbus = max(max(nl), max(nr));
Z = R + j*X; y= ones(nbr,1)./Z; %branch admittance
for n = 1:nbr
if a(n) <= 0
a(n) = 1;
else
end
Ybus=zeros(nbus,nbus); % initialize Ybus to zero
% formation of the off diagonal elements
for k=1:nbr;
Ybus(nl(k),nr(k))=Ybus(nl(k),nr(k))-y(k)/a(k);
Ybus(nr(k),nl(k))=Ybus(nl(k),nr(k));
end
end
% formation of the diagonal elements
for n=1:nbus
for k=1:nbr
if nl(k)==n
Ybus(n,n) = Ybus(n,n)+y(k)/(a(k)^2) + Bc(k);
elseif nr(k)==n
Ybus(n,n) = Ybus(n,n)+y(k) +Bc(k);
else
end
end
end
% clear Pgg

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by