Matlab Examples and Exercises
Matlab Examples and Exercises
= (2)
2 2
sin sin ' z R R = = (3)
Then we want to divide the winding to many segment along the direction of the current I in order to allow
MATLAB program to calculate the magnetic field. Assume we want to divide the winding to n segments,
then we have to pick up n+1 points on the winding. And for the i-th point, the angle is given by
max min
min
' '
' ' ( 1)
i
i
n
= + , where
min
' 0 = and ( )
max
' 2 Number of turns =
by plugging this equation into (1) (2) and (3), we can find
i
R ,
i
, and
i
z . Also, we can find the rectangular
coordinate
i
x ,
i
y ,and
i
z by using the formula
cos
i i i
x R =
sin
i i
y R =
i i
z z =
Note the i-th segment is a vector given by
1 1 1
( ( (
i i i x i i y i i y
x x y y z z
+ + +
= + + L )a )a )a
and the vector
i
R (pointing from the center of the i-th segment to the observation point) is given by
( )
1 1 1
, , , ,
2 2 2
i i i i i i
i i
x x y y z z
P C x y z
+ + +
= =
R
ECE3FI4 - Theory and Applications in Electromagnetic Page: 3
MATLAB Examples and Exercises (Set 16 solution)
5.0 A I =
O
1
R
2
R
R
M
z
Figure E16.2 Cross section view of the toroid in the example
problem. R and z are cylindrical coordinates of point M. It
can be shown that
1 2
cos R R R = + ,
2
sin z R = . And if M
is on the k-th turn,
2( 1)
Number of turns
k
= .