StackOverflowMATLABchat/legtools

strcheck errors for string arrays

Closed this issue · 1 comments

sco1 commented

The strcheck helper method is currently hardcoded to error out when presented with an input that is not of type char or cell:

if ~iscell(newString)
    msgID = sprintf('legtools:%s:InvalidLegendString', src);
    error(msgID, ...
          'Invalid Data Type Passed: %s\n\nData must be of type(s): %s, %s', ...
          class(newString), class({}), class('') ...
          );
end

With the addition of the string data type in MATLAB R2016b there is another valid option for representing arrays of strings that is currently not supported by legtools

sco1 commented

A fix has been implemented and will be tested in the morning when I finally get around to installing R2016b on my development machine.