summaryrefslogtreecommitdiff
path: root/3769/CH8/EX8.23/Ex8_23.sce
blob: 4740aaccc4a90913445b7a5d2fe57701c80479d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clear
//Given
r1=20
r2=25
I=2                   //a

//Calculation
//
r=(r1+r2)/2.0
l=(2*%pi*r)*10**-2
n=1500/l
u=4*%pi*10**-7
B=u*n*I

//Result
printf("\n (i) Magnetic field inside the toroid is %0.3f  T",B)
printf("\n (ii) magnetic field outside the toroid is zero")