# In below program we will calculate correlation of a and b.
# So output matrix will have 4 values,
# because 2*2(n*n- n is the number of arrays)

import numpy as np
a=np.array([5,6,4,3,2])
b=np.array([4,9,4,3,1])
print()
c=np.corrcoef(a,b)
print(c)
print()

# Covariance of three arrays
print()
a=np.array([[5,6,4,3,2],[4,9,4,3,1],[1,8,4,3,9]])
c=np.corrcoef(a)
print(c)


# In below program we will calculate correlation of a and b.
# So output matrix will have 4 values,
# because 2*2(n*n- n is the number of arrays)

import numpy as np
a=np.array([5,6,4,3,2])
b=np.array([4,9,4,3,1])
print()
c=np.corrcoef(a,b)
print(c)
print()

# Covariance of three arrays
print()
a=np.array([[5,6,4,3,2],[4,9,4,3,1],[1,8,4,3,9]])
c=np.corrcoef(a)
print(c)


# In below program we will calculate correlation of a and b. # So output matrix will have 4 values, # because 2*2(n*n- n is the number of arrays) # Covariance of three arrays