Skip to content

Commit d6f038a

Browse files
committed
fix bugs in string support
1 parent dfe71e3 commit d6f038a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tb_optparse.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@
116116
assert(iscell(argv), 'SMTB:tboptparse:badargs', 'input must be a cell array');
117117

118118
if ~verLessThan('matlab', '9.1')
119-
% strings only appeared in 2016b
119+
% is only appeared in 2016b
120120

121121
% handle new style string inputs
122122
% quick and dirty solution is to convert any string to a char array and
123123
% then carry on as before
124124

125125
% convert any passed strings to character arrays
126126
for i=1:length(argv)
127-
if isstring(argv{i})
127+
if isstring(argv{i}) && length(argv{i}) == 1
128128
argv{i} = char(argv{i});
129129
end
130130
end

0 commit comments

Comments
 (0)