summaryrefslogtreecommitdiff
path: root/1970/CH1/EX1.6/Ch01Exa6.sce
blob: 3991a1c4ed538ccbe1bd79f7e4df4eb29002d91a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Scilab code Exa1.6:  : Page 53 (2011)
clc; clear;
V = 1000;            // Potential difference, volts
R = 18.2e-02;        // Radius of the orbit, metre
B = 1000e-04;        // Magnetic field, tesla
e = 1.60218e-019;        // Charge of an electron, C
n = 1;                    // Number of the ion
v = 2*V/(R*B);            // Speed of the ion, metre per sec
M = 2*n*e*V/v^2;            // Mass of the ion, Kg
printf("\nSpeed of the ion: %6.4e m/s \nMass of the ion : %4.2f u", v, M/1.67e-027);

// Result
// Speed of the ion: 1.0989e+05 m/s 
// Mass of the ion : 15.89 u