How to find force using coulomb's law by using MATLAB.

1.Introduction:-
The coulomb's law states that like charges repel and opposite charges attracts with force which is proportional to the product of charges and inversely proportional to distance between them.


2.Problem Statement:-
To find magnitude using coulomb's law by using MATLAB.


3.Program:-

clc;
clear all;
close all;
q0=1e-9;
q1=1;
q2=1;
p0=[2 0 0];
p1=[0 1 0];
p2=[0 -1 0];
eps=8.854e-12;
r10=(sum((p0-p1).^2)).^(1/2);
r20=(sum((p0-p2).^2)).^(1/2);
r10u=(p0-p1)/r10;
r20u=(p0-p2)/r20;
f=q0*q1*r10u/(4*pi*eps*r10*r10)+q0*q2*r20u/(4*pi*eps*r20*r20);
fmag=sqrt(sum(f.*f));
display (f)


4.How to use this code:-
Here you have to only copy the code to MATLAB and just run it.


5.Output :-


 Figure Window  


                              

6.Conclusion -


Here we have   find force using coulomb's law by using MATLAB .

Comments

  1. Pretty great post. I simply stumbled upon your blog and wanted to mention that I have really loved surfing around your blog posts. Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it
    matlab-crack
    wondershare-filmora-scrn-crack

    ReplyDelete


  2. So nice I am enjoying for that post as for u latest version of this Security tool Available
    matlab-crack

    ReplyDelete
  3. This post is so interactive and informative.keep updating more information...
    Career In .NET
    About Dot NET

    ReplyDelete

Post a Comment

Popular post

How to plot AM (Amplitude Modulated) signal using MATLAB

How to do Phase Shift Keying (PSK) using MATLAB

How to do Frequency Shift Keying (FSK) using MATLAB