how do i put MATLAB complex array to python?
I want to python code in MATLAB.(use pyrunfile)
I can’t put complex array into python.
I’m testing very simple code.
python core:(file :Test.py):
print(indat)
MATLAB(inline input):
adat=xxx
pyrunfile("./Test.py",indat=adat)
I got results under below.
Case A: input adat=1+0.1i (MATALB inline)
output (1+0.1j)
Case A is OK
Case B: input adat=[1,2,3]
output array(‘d’, [1.0, 2.0, 3.0])
Case B is OK
Case C:input adat=[1+0.1i,2+0.2i,3+0.3i]
Output <memory at 0x000002562F9E9560>
Why?
what should i do put complex array into python?I want to python code in MATLAB.(use pyrunfile)
I can’t put complex array into python.
I’m testing very simple code.
python core:(file :Test.py):
print(indat)
MATLAB(inline input):
adat=xxx
pyrunfile("./Test.py",indat=adat)
I got results under below.
Case A: input adat=1+0.1i (MATALB inline)
output (1+0.1j)
Case A is OK
Case B: input adat=[1,2,3]
output array(‘d’, [1.0, 2.0, 3.0])
Case B is OK
Case C:input adat=[1+0.1i,2+0.2i,3+0.3i]
Output <memory at 0x000002562F9E9560>
Why?
what should i do put complex array into python? I want to python code in MATLAB.(use pyrunfile)
I can’t put complex array into python.
I’m testing very simple code.
python core:(file :Test.py):
print(indat)
MATLAB(inline input):
adat=xxx
pyrunfile("./Test.py",indat=adat)
I got results under below.
Case A: input adat=1+0.1i (MATALB inline)
output (1+0.1j)
Case A is OK
Case B: input adat=[1,2,3]
output array(‘d’, [1.0, 2.0, 3.0])
Case B is OK
Case C:input adat=[1+0.1i,2+0.2i,3+0.3i]
Output <memory at 0x000002562F9E9560>
Why?
what should i do put complex array into python? complex array, python MATLAB Answers — New Questions