Skip to content

Some strings returned as "string" class instead of "char" in recent matlab versions #50

Closed
@jobh

Description

Arrays of strings are parsed by matlab's eval, and since they use double quotes they end up as string instead of char starting from 2017a.
A simple fix is to convert them back at the end, something like the following in loadjson.m (after parsing):

% The eval in parse_array creates strings, not char arrays, in R2017a+. Convert
% back (in try block, because the method probably doesn't exist in earlier versions)
try
    data = controllib.internal.util.hString2Char(data);
catch
end

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions