Paragraph EXAM is open book (pdf) but closed notes. MATLAB must be opened with a
ID: 2291438 • Letter: P
Question
Paragraph EXAM is open book (pdf) but closed notes. MATLAB must be opened with a blank folder by selecting a NEW FOLDER If you use MATLAB, please make sure you copy/paste both code and answers to a submission notepad file to get credit PROBLEM 1, Chapter 4: Three point charges Q1- 1nC, Q2-4nC and Q3-2nC ape located at Pl-[1 0 1]. P2-10 1 1] and P 11 0] respectively Find the total energy in the system. Solution Complete MATLAB code then run it or use MATLAB steps as a guidance to compute the answers manually cleat clc: 1 ]; P3-[1 1 0 ]:96 point locations PI=[ 1 0 1]; P2-{0 1 R12- P1-P2 Rn12-aann(R12); R13 % vector P1-P2 %magnitude of(P1-P2) P1-P3 Rn13-noma ). % vectoragnitude of(P1-P3) % vector p2.p3 R23 Rn23s oral ); % magnitude of (P2-P3) eps0-8 86e-12, %free space constant Vf 114 *p?"eps0MQ2/Rn1 2+Q3/Rn 1 3) %compute vi (given) V3-14 pi eps0)* W-1/2* ) %compute V2 ) %compute V3 ) % total system energyExplanation / Answer
Dear user,
Please find the code attached
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear all;
close all;
%%
Q1=1e-9;Q2=4e-9;Q3=-2e-9;
P1=[1 0 1];P2=[0 1 1];P3=[1 1 0];
R12=P1-P2;
Rn12=norm(R12);
R13=P1-P3;
Rn13=norm(R13);
R23=P2-P3;
Rn23=norm(R23);
eps0=8.86e-12;
V1=(1/(4*pi*eps0))*(Q2/Rn12+Q3/Rn13);
V2=(1/(4*pi*eps0))*(Q1/Rn12+Q3/Rn23);
V3=(1/(4*pi*eps0))*(Q2/Rn23+Q1/Rn13);
W=1/2*(Q1*V1+Q2*V2+Q3*V3);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Outputs:
Rn12 =
1.4142
Rn13 =
1.4142
Rn23 =
1.4142
V1 =
12.7020
V2 =
-6.3510
V3 =
31.7549
W =
-3.8106e-08
Please let me know if you have any doubts
Thank You.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.