blob: 5eea3a682eb41951d777bdc4a3367bbf163995ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clear
//Given
n=20
I=1 //A
r=0.08 //m
u=4*3.14*10**-7 //T/A m
//Calculation
B=u*n*I/(2*r)
//Result
printf("\n Magnitude of the magnetic field is %0.3f *10*4 T", B*10**4)
|