Skip to content

'\0' not properly escaped when passing string #8

@lrq3000

Description

@lrq3000

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:

  1. 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).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions