[Pymat-users] Problem passing x = array([1, 2, 3, 4, 5]) to Matlab
Brought to you by:
ajssf
From: Varun P. <pur...@ya...> - 2006-04-02 18:10:56
|
Hi I am a Masters student at UTD and have started learning Python. I had a really good experience at Pycon 2006. I am kinda stuck on a small issue of PyMat. I am tryin to pass a Numeric array to Matlab 7.0.1 I am running Python 2.2 (as PyMat supports that) on Windows XP. The problem is that when i pass x = array([1, 2, 3, 4, 5]) to Matlab by using >>> import pymat >>> from Numeric import * >>> x = array([1, 2, 3, 4, 5]) >>> H = pymat.open() >>> pymat.put(H, 'x', x) the value of x is [1, 2, 3, 4, 5] in Python, but when it gets passed to Matlab, it becomes [0 0 0 0 0] ... all zeros. Can anyone suggest what needs to be done. any help would be appreciated. - Varun --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates. |