blob: 4833a7636b4ee187318c96825171ae505a5cda24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//Chapter-6,Example6_1_2,pg 6-7
m=9.1*10^-31 //mass of an electron in kg
v=3*10^7 //velocity of an electron
B=0.23 //strength of uniform magnetic field
e=1.6*10^-19 //charge of an electron
angle=45 //angle between velocity vector and field direction
r=m*v*sind(angle)/(B*e)*10^3 //radius of revolution
printf("\nradius of revolution r = %.3f mm\n",r)
l=v*cosd(angle)*2*%pi*m/(B*e)*10^3 //pitch f helical path
printf("pitch of helical path l = %.1f mm\n",l)
|