Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b51f918

Browse files
committed
Always make cell array of arguments
Fixes arokem#228
1 parent 9822c7b commit b51f918

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pymatbridge/matlab/util/pymat_eval.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@
3535
rehash
3636

3737
if iscell(req.func_args)
38-
[resp{1:req.nargout}] = feval(req.func_name, req.func_args{:});
38+
func_args = req.func_args;
3939
else
40-
[resp{1:req.nargout}] = feval(req.func_name, req.func_args);
40+
% If we don't have a cell, the JSON decoder has managed to merge
41+
% everything into an array, which we don't want
42+
func_args = num2cell(req.func_args, 1);
4143
end
44+
[resp{1:req.nargout}] = feval(req.func_name, func_args{:});
4245

4346
if req.nargout == 1
4447
response.result = resp{1};

0 commit comments

Comments
 (0)