If a string contains '\0', MATLAB will think the string terminates at this point, and it will output a weird error (but only when using mlabraw, else you will get random errors in your softwares):
A MATLAB string constant is not terminated properly
The solution for me was to define my strings as raw before supplying them to mlab.
BTW, two other remarks:
matlab.cd() doesn't work, you need to use os.chdir() before using your matlab commands to change the directory (by in fact changing Python's current dir).
- In the documentation, it's written
mlab.log(0) when in fact it should be mlab.log(0.) (notice the dot), because we need to pass a float, else you get a warning about int32 type not recognized...
I'm on Windows 7 x64.
If a string contains '\0', MATLAB will think the string terminates at this point, and it will output a weird error (but only when using
mlabraw, else you will get random errors in your softwares):The solution for me was to define my strings as
rawbefore supplying them to mlab.BTW, two other remarks:
matlab.cd()doesn't work, you need to useos.chdir()before using your matlab commands to change the directory (by in fact changing Python's current dir).mlab.log(0)when in fact it should bemlab.log(0.)(notice the dot), because we need to pass a float, else you get a warning aboutint32type not recognized...I'm on Windows 7 x64.