Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

%Part 1 A eps0 = 8.85e-12; k=1/ (4*pi*eps0) ; q1=1e-9; q2=-1e-9; a = 1; [x, y] = meshgrid( -2.1:0. 2:2.1, -2.1:0.2:2.1); r1=sqrt( (x+a) . ^2

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
%Part 1 A eps0 = 8.85e-12; k=1/ (4*pi*eps0) ; q1=1e-9; q2=-1e-9; a = 1; [x, y] = meshgrid( -2.1:0. 2:2.1, -2.1:0.2:2.1); r1=sqrt( (x+a) . ^2 + y. ^2) ; r2=sqrt((x-a) . ^2 + y. ^2) ; V1= k*q1./r1; 10 V2=k*q2. /r2; 11 V=double (V1 +V2) ; 12 [px, py]=gradient (V, 0.01, 0.01); 13 subplot (2,2,1) 14 contour (x, y, V) 15 subplot (2, 2, 2) 16 surf (x, y, V) 17 subplot (2, 1, 2) 18 quiver (x, y, -px, - py)%Part 1 B eps0 = 8.85e-12; k=1/(4*pi*eps0) ; q1 = -1e-3; a = 2.2; Q2 = 1e-3; L = 4; lambda = Q2/L; [x, y] = meshgrid( -2:0.2:2, 0.1:0.2: 2); syms X; r1 = sqrt(x. ^2 + (y-a). ^2) ; r2 = sqrt((x-X) . ^2 + y.^2); 10 V1 = k*q1./r1; 11 V2 = k*int(lambda. /r2, X, -L/2, L/2); 12 V = double (V1 +V2) ; 13 [px, py]= gradient (V, 0.1, 0.1); 14 subplot (2, 2, 1) 15 contour (x, y, V) 16 subplot (2, 2, 2) 17 surf (x, y, V) 18 subplot (2, 1, 2) 19 quiver (x, y, -px, -py, 2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning Scientific Programming With Python

Authors: Christian Hill Page

1st Edition

110742822X, 9781107428225

More Books

Students also viewed these Physics questions

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago