summaryrefslogtreecommitdiff
path: root/3850/CH34/EX34.1/Ex34_1.sce
blob: a4dd899f67a7414de2199d07921730078ac43b5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

//To Find the Force and Acceleration

//Example 34.1

clear;

clc;

q=1.6*10^-19;//Charge on a proton in Coloumbs

v=3.0*10^6;//Projected Speed of the Proton in m/s

B=2.0*10^-3;//Uniform magnetic field strength in Tesla

theta=%pi/2;//Angle between Magnetic Field and Velocity

F=q*v*B*sin(theta);//Force on the proton due to Magnetic Field

printf("Force on the proton = %f*10^-16 N",F*10^16);

m=1.67*10^-27;//Mass of a proton in kg

a=F/m;//Acceleration of the proton in m/s^2

printf("\n Acceleration of the proton=%f*10^11 m/s^2",a*10^-11);