Skip to content

Instantly share code, notes, and snippets.

@silgon
Last active July 22, 2022 06:27
Show Gist options
  • Save silgon/f3d7b52b32bdcf26c11d910a8c9a9194 to your computer and use it in GitHub Desktop.
Save silgon/f3d7b52b32bdcf26c11d910a8c9a9194 to your computer and use it in GitHub Desktop.
# Ax for all x>=0
import matplotlib.pyplot as plt
import numpy as np
x1 = x2 = np.linspace(0, 1, 10)
X1, X2 = np.meshgrid(x1, x2)
x = np.c_[X1.ravel(), X2.ravel()].T
A = np.array([[.5, 3], [1, 1]])
y = A@x
plt.scatter(x[0], x[1])
plt.scatter(y[0], y[1])
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment