I'm using MATLAB python engine to automate some data processing. I'm perfectly comfortable using this code to return the correlation coefficient matrix for two random columns:
import matlab.engineeng = matlab.engine.start_matlab()rndArray = eng.randn(10, 2)R = eng.corrcoef(rndArray)
When I use this line in MATLAB:
[R, P] = corrcoef(rndArray)
It would also return the p-value matrix for the results. But the equivalent line in python:
[R, P] = eng.corrcoef(rndArray)
does not return two matrices. What am I doing wrong? How can I get multi results in python?
Thank you
Best Answer