From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2681/CH1/EX1.2/Ex1_2.sce | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 2681/CH1/EX1.2/Ex1_2.sce (limited to '2681/CH1/EX1.2') diff --git a/2681/CH1/EX1.2/Ex1_2.sce b/2681/CH1/EX1.2/Ex1_2.sce new file mode 100755 index 000000000..42aa98b74 --- /dev/null +++ b/2681/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,15 @@ +//determine the electric field at a point; +//given +clc +Qf=2d-6 +Qt=1d-6 +rf=[1 0 0]//this can also be written as ax +rt=[0 1 0]//this can also be written as ay +rtf=rt-rf +Rtf=norm(rtf)//this is the magnitude of the vector +atf=rtf/Rtf//the unit vector across the two points p1 and p2 +//the electric field at the point p2 is given by: +epsilon0=8.85D-12//value may differ, as i have not used the estimated value +E=((Qf*Qt)/(4*%pi*epsilon0*(Rtf)^2))*atf//electric field calculation +E=round(E*1d+6)/1d+6///rounding off decimals +disp(E*1d+3,'the electric field of p2 is:')//mN/C -- cgit