M-File Programming for Transmission Line: clc clear disp( 'STUDYING THE CHARECTERISTICS OF A TRANSMISSION LINE' ) disp( '***************************************************' ) disp( ' ' ) V=input( 'Receiving end line voltage in volt =' ); L=input( 'length of transmission line in km =' ); Pr=input( 'Rated power at receiving end load =' ); pf=input( 'power factor=' ); I=Pr/(sqrt(3)*V*pf); a1=acos(pf); Vr=V/sqrt(3) Ir=I*cos(a1)-j*I*sin(a1) r=input( 'resistance/km/phase=' ); x=input( 'inductive reactance/km/phase=' ); R=r*L; X=j*x*L; Z=R+X if V>20000 y=input( 'capacitive susceptance/km/phase=' ); Y=j*y*L m=Y*Z; end if V disp( 'SHORT TRANSMISSON LINE' ) disp( '**********************' ) A=1 B=Z C=0 D=A end if V>20000 & V disp( ...
Electrical MATLAB Programming