summaryrefslogtreecommitdiff
path: root/2975/CH29/EX29.2w/Ex29_2w.sce
blob: 354188c68794a232407d588a3465e3a7580f804f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//developed in windows 8 operating system 64bit
//platform Scilab 5.4.1
//example 29_2w

clc;clear;
//Given Data

q_a=8*10^-6;        //Charge at A (Unit: C)
q_b=-2*10^-6;       //Charge at B (Unit: C)
dis_ab=20*10^-2;    //Distance between A and B(Unit: m)

//Calculation


distance=dis_ab/((q_a/(-q_b))^(1/2)-1);     //Calculation of the distance of the third particle (Unit: m)
distance_cm=100*distance;                   //Converting distance from meter to centimeter (Unit:cm)

disp(distance_cm,"Third particle should be placed at (Unit : cm)");