Line integrals in vector fields - both on paper and with python

preview_player
Показать описание
Here is an example of line integrals in the vector field f = x*xhat + y*yhat.

Code here
Рекомендации по теме
Комментарии
Автор

This channel is a goldmine. Thank you sir.

Mayank-mfxr
Автор

For anyone interested, here is the code for the vector field on python
import numpy as np
import matplotlib.pyplot as plt


def f(Y):
x, y = Y
return [x, y]

x= np.linspace(-6, 6, 10)
y= x
origin = [0], [0]
Y1, Y2 = np.meshgrid(x, y)
u, v = np.zeros(Y1.shape), np.zeros(Y2.shape)
NI, NJ = Y1.shape

for i in range(NI):
for j in range(NJ):
x = Y1[i, j]
y = Y2[i, j]
yprime = f([x, y])
u[i, j] = yprime[0]
v[i, j] = yprime[1]

Q = plt.quiver(Y1, Y2, u, v, color='black')
plt.show()

mariomuysensual
Автор

I just love the way you explain everything!

SuperMariocapo
Автор

Nice video👍, can i request for micromagnetic field in python? Like LLG equation. Thank you.

panjiaji