Program: clc; clear all; n=input('No of buses'); l=input('No of lines'); s=input('Impedance or Admittance'); for(i=1:l) a=input('Starting bus'); b=input('Ending bus'); t=input('Admittance or Impedance value'); if(s==1) y(a,b)=1/t; else y(a,b)=t; end y(b,a)=y(a,b); end ybus=zeros(n,n); for(i=1:n) for(j=1:n) if(i==j) for(k=1:n) ybus(i,j)=ybus(i,j)+y(i,k); end else ybus(i,j)=-y(i,j); end ybus(j,i)=ybus(i,j); end end ybus
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.