%PROGRAM TO FIND OUT MAGNETIC FIELD INTENSITY DUE TO FINITE %CURRENT CARRYING FILAMENT I = input('Enter the value of current in Amperes = '); P = input('Enter the radius in meters = '); alpha1 = input('Enter the first phase angle in degrees = '); alpha2 = input('Enter the second phase angle in degrees ='); %Degree to Radian conversion alpha1 = (pi/180)*alpha1; alpha2 = (pi/180)*alpha2; H = I/((4*pi*P)*((sin(alpha1))-(sin(alpha2)))); disp('Magnetic Field Intensity due to Finite Current Carrying Filament = '); H