summaryrefslogtreecommitdiff
path: root/3802/CH4/EX4.16/Ex4_16.sce
blob: cbcb797ed7c723697174befb1afbf749216d6430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Book Name:Fundamentals of Electrical Engineering
//Author:Rajendra Prasad
//Publisher: PHI Learning Private Limited
//Edition:Third ,2014

//Ex4_16.sce.

clc;
clear;
q1=-2e-9;
q2=3e-9;
q3=2e-9;
q4=1e-9;
AB=1;              //Given square side as 1 metre
BC=1;
epsilon_not=8.854e-12;
AP=sqrt(AB^2+BC^2)/2;             //formula derived from the figure
Vp=(1/(4*%pi*epsilon_not*AP))*(q1+q2+q3+q4);
printf("\n Potential at the centre of the square=%2.2f volt",Vp)

//Answer vary due to roundoff error