Info

此问题已关闭。 请重新打开它进行编辑或回答。

store each result inspite of re write updated answer i work in main file and call function from function file store each result of values which run in function file

1 次查看(过去 30 天)
function [branchcu,totalpowerloss,vpu,finalloss] = loadflow1(sys,DLF,BIBC,branch,result,BCBV)
v0=(12660+1i*0).*ones(branch,1);
P=sys(:,6)*1000;
Q=sys(:,7)*1000;
v=v0;
for k=1:20
I=-conj((P+1i*Q)./v);
delta_v=DLF*I;
v=v0+delta_v;
end
v_pu=[1+1i*0;v./12660];
voltage_perUNIT=abs(v_pu)';
vpu=voltage_perUNIT'
branchcu=abs(BIBC*I)
for r=1:branch
powerloss=branchcu(r)^2*sys(r,4);
t1(r)=powerloss;
end
total_powerloss=sum(t1)
end
when i call variables in command window it shown undefine variable,,how to store each element

回答(0 个)

此问题已关闭。

产品

Community Treasure Hunt

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

Start Hunting!

Translated by