Python for MATLAB Users
Justin Kiggins
Product Manager
print(arr)
[[2, 4, 8, 16, 32]]
print(arr[2])
8
print(arr[0])
2
print(arr[-1])
32
import matplotlib.pyplot as plt
# Create a new figure plt.figure()
# Plot y as a function of x plt.plot(x, y)
# Set the x-label and y-label plt.xlabel('x') plt.ylabel('y')
# Be sure to show the plot! plt.show()
Python for MATLAB Users