How to find force using coulomb's law by using MATLAB.
1.Introduction:-
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 :-
6.Conclusion -
Here we have find force using coulomb's law by using MATLAB .
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.
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 .
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
ReplyDeletematlab-crack
wondershare-filmora-scrn-crack
ReplyDeleteSo nice I am enjoying for that post as for u latest version of this Security tool Available
matlab-crack
This post is so interactive and informative.keep updating more information...
ReplyDeleteCareer In .NET
About Dot NET