In python, I generated a .p data file by
pickle.dump( allData, open( "myallData.p", "wb" ))
Now I want to read myallData.p in Matlab. (My Matlab is installed under Windows 8, which does not have python in it.) Any ideas? Thanks in advance.
I ended up with read the data back from the .p file:
[whatever_data]=pickle.load( open( "myallData.p", "rb" ) )
Then use scipy to convert and save the data to .mat
import numpy, scipy.io
scipy.io.savemat('/home/myfiles/mydata.mat', mdict={'whatever_data': whatever_data})
So as to avoid dealing with pickle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With