%PROGRAM TO FIND OUT RELUCTANCE,MAGNETIC FLUX DENSITY %MAGNETIC FIELD INTENSITY clear all; clc; r = input('Enter the radius of core in meters ='); a = input('Enter the area of core in square meters ='); l = input('Enter the length of core in meters ='); u0 = input('Enter the value of free space permeability = '); uR = input('Enter the value of Relative permeability = '); I = input('Enter the value current in Amperes ='); N = input('Enter the number of turns = '); u = u0*uR; %Calculate Reluctance disp('Reluctance = '); R = l/(u*a) %Calculate Magnetic Flux Density disp('Magnetic Flux Density = '); B = (N*I)/(R*a) %Calculate Magnetic Field Intensity disp('Magnetic Field Intensity = '); H = B/u