COULOMBS LAW USING MATLAB

A charge Q1=-20 uC is isolated at P (-6, 4, 6) and charge Q)= -50 pC is located at R (5, 8,-2) in a free space. Find the force exerted on Q2 by QI in vector form. The distance is given in meters. Verify the answer using MATLAB.

Matlab Code:

q1 = 20e-6

q2 = 50e-6

r1 = [5 8 -2]

r2 = [-6 4 6]

a = norm(r2-r1)

unit = (r2-r1)/a

b = a^2

f = (q1*q2)/(4*3.14*8.854e-12*b)*unit

F = norm(f)










Comments

Popular posts from this blog

DIPOLE ANTENNA CALCULATOR

MIMO Antenna Parameters

Circular Loop Antenna Calculator