summaryrefslogtreecommitdiff
path: root/3850/CH36/EX36.4/Ex36_4.sce
blob: 9cfcb81381d72324b44a22d63c329710c604046c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

//To Find the Magnetic Field due to Magnetic Dipole

//Example 36.4

clear;

clc;

M=1.2;//Magnetic Moment of the Dipole in A-m^2

r=1;//Distance of point P from Magnetic Pole in metres

theta=%pi/3;//Angle made by given point with the Dipole Axis in radians

k=1*10^-7;//Constant (u0/(4*pi))

B=k*M*sqrt(1+3*(cos(theta))^2)/(r)^3;//Magnitude of Magnetic Field at the Given Point in Tesla

printf("Magnitude of Magnetic field at a point 1 metre from the Magnetic Dipole = %.1f*10^-7 T",B*10^7);

alpha=atan(tan(theta)/2)*180/%pi;//Angle made by magnetic field with the radial line

printf("\n Magnetic field makes an angle %.2f degrees with the radial line",alpha);