5th semester files

This commit is contained in:
2024-02-22 14:23:12 -05:00
parent e39a9fec53
commit 5223b711a6
727 changed files with 1836099 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
clear all;
k = 9e9;
q1 = 1.0e-6;
q2 = -1.0e-6;
ax = 1.0;
ay = 0;
bx = -1.0;
by = 0;
[X, Y] = meshgrid(-2:0.9:2,-2:0.9:2);
V = 1./sqrt((X - ax).^2 + (Y-ay).^2 ) * k * q1 + 1./sqrt((X-bx).^2 + (Y-by).^2) * k * q2;
surfc(X, Y, V);
[Ex, Ey] = gradient(-V, 0.2, 0.2);
figure
contour(X, Y, V);
hold on;
quiver(X, Y, Ex, Ey);