Info
This question is closed. Reopen it to edit or answer.
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 view (last 30 days)
Show older comments
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 Comments
Answers (0)
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!