Lab 203 Electrical Potential

Lab 203 Electrical Potential - Lab 203: Electric Potential...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lab 203: Electric Potential Name : William Savastano Object : To calculate the electric potential due to a charge and draw a contour and surface plots of the electric potential using matlab. Theory : For a given charge q the scalar electrostatic potential V at point (x,y) is given by three formulas. >> clear all >> q=1*10^-9; >> esp0=8.85*10^-12 >> k=1./(4*pi*esp0); >> k=1./(4*pi*esp0); >> x=-2.1:0.2:2.1; >> y=-2.1:0.2:2.1 >> [X,Y]=meshgrid(x,y); >> r=sqrt((X-1).^2+(Y-1).^2); >> V=k*q./r; >> [c,h] = contour(x,y,V,20); >> clabel(c,h); xlabel 'x'; ylabel 'y' >> surf(x,y,V) >> [px,py]=gradient(V,.1,.1); >> quiver(x,y,-px,-py,2) >> xlabel 'x'; ylabel 'y' 4 . 9 8 1 5 4 . 9 8 1 5 4 .981 5 7 . 9 1 1 8 7 .9 1 1 8 7 . 9 1 1 8 7 . 9 1 1 8 1 . 8 4 1 1 1 .8 4 1 1 1 . 8 4 1 1 1 3 . 7 7 1 1 1 3 . 7 7 1 1 1 3 .7 7 1 1 1 6 . 7 1 2 1 6 .7 12 1 9 .6 3 1 2 19 .63 12 2 2 . 5 6 1 2 22.5612 2 5 . 4 9 1 3 2 8 .4 2 1 3 3 1 . 3 5 1 3 3 4 . 2 8 1 4 3 7 . 2 1 1 4 4 . 1 4 1 4 4 3 . 7 1 4 4 6 . 1 5 4 8 . 9 3 1 5 51.861551....
View Full Document

This note was uploaded on 09/16/2011 for the course PHYSICS 121 taught by Professor Fayngold during the Spring '10 term at NJIT.

Page1 / 9

Lab 203 Electrical Potential - Lab 203: Electric Potential...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online