{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab 203

# Lab 203 - Lab 203 Electric Potential Robert Crescenzi...

This preview shows pages 1–11. Sign up to view the full content.

Lab 203 Electric Potential Robert Crescenzi 2/24/2011

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Objective: To calculate the electric potential due to a charge and draw a contour and surface plots of the electric potential using MATLAB. Theory: The following equations were introduced in this lab. = V 14πεqr = + r x2 y2 = = . k 14πε 9 10^9Nm2C2 = ( + ) V 14πε q1r1 q2r2 =( - ) +( - ) r2 x1 x 2 y1 y 2 =( - ) +( - ) r2 x2 x 2 y2 y 2 = + , - ( , ) Ex Vx ∆x y V x y ∆x = + , - ( , ) Ey Vx ∆x y V x y ∆y
Procedure: (Question 1) q=1*10^(-9); esp0=8.85*10^(-12); k=1./(4*pi*esp0); x= -2.1:0.2:2.1; y=-2.1:0.2:2.1; [X, Y] = meshgrid(x,y); r1 = sqrt((X-1).^2+(Y-1).^2); r2 = sqrt((X-1).^2+(Y+1).^2); r3 = sqrt((X+1).^2+(Y+1).^2); r4 = sqrt((X+1).^2+(Y-1).^2); V1 = k*q./r1; V2 = k*-q./r2; V3 = k*q./r3; V4 = k*-q./r4;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Vt = V1 + V2 + V3 + V4; [c,h] = contour(x,y,Vt,10); clabel(c,h); xlabel 'x' ; ylabel 'y' surf(x, y, Vt) [px, py] = gradient(Vt, 0.1, 0.1); quiver(x,y,-px, -py, 2) xlabel 'x' ; ylabel 'y' (Question 2) q=1*10^(-9); esp0=8.85*10^(-12); k=1./(4*pi*esp0); x= -2.1:0.2:2.1; y=-2.1:0.2:2.1; [X, Y] = meshgrid(x,y);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 11

Lab 203 - Lab 203 Electric Potential Robert Crescenzi...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online