एरेज़ और प्लॉटिंग

MATLAB उपयोगकर्ताओं के लिए Python

Justin Kiggins

Product Manager

NumPy एरेज़

  • एरेज़ = मैट्रिसेज़
  • एरेज़ मल्टीडायमेंशनल हो सकते हैं
  • हर एलिमेंट का टाइप एक सा होता है
MATLAB उपयोगकर्ताओं के लिए Python

NumPy एरेज़ में इंडेक्सिंग

print(arr)
[[2, 4, 8, 16, 32]]
  • ज़ीरो-बेस्ड इंडेक्सिंग
print(arr[2])
8
print(arr[0])
2
print(arr[-1])
32
MATLAB उपयोगकर्ताओं के लिए Python

Matplotlib से डेटा विज़ुअलाइज़ करना

उदाहरण matplotlib विज़ुअलाइज़ेशन

MATLAB उपयोगकर्ताओं के लिए Python

matplotlib का उपयोग

import matplotlib.pyplot as plt
# एक नया फ़िगर बनाएँ
plt.figure()

# x के फ़ंक्शन के रूप में y प्लॉट करें plt.plot(x, y)
# x-label और y-label सेट करें plt.xlabel('x') plt.ylabel('y')
# प्लॉट दिखाना न भूलें! plt.show()

MATLAB उपयोगकर्ताओं के लिए Python

अभ्यास करते हैं!

MATLAB उपयोगकर्ताओं के लिए Python

Preparing Video For Download...