summaryrefslogtreecommitdiff
path: root/3809/CH5/EX5.1/EX5_1.sce
blob: fd918436eba49ab5e0d6f06dc0deee60446aa422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Chapter 5, Example 5.1

clc
//Initialisation'
i=5                             //current in amp
r=100*10**-3                    //radius in meter
pi=3.14                         //pi

//Calculation
l=2*pi*r                         //circumference
h=i/l                            //magnetic field strength



//Results
printf("Magnetic field strength, H = %.2f A/m",h)