Skip to content

Commit

Permalink
[feat] support keyword=value input for matlab R2021 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Dec 24, 2024
1 parent fea26cd commit c43e30b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion varargin2struct.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
while (i <= len)
if (isstruct(varargin{i}))
opt = mergestruct(opt, varargin{i});
elseif (ischar(varargin{i}) && i < len)
elseif ((ischar(varargin{i}) || isa(varargin{i}, 'string')) && i < len)
opt.(lower(varargin{i})) = varargin{i + 1};
i = i + 1;
else
Expand Down

0 comments on commit c43e30b

Please sign in to comment.