Python per utenti MATLAB
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
# Crea una nuova figura plt.figure()# Traccia y in funzione di x plt.plot(x, y)# Imposta etichette x e y plt.xlabel('x') plt.ylabel('y')# Mostra il grafico plt.show()

Python per utenti MATLAB