Skip to content

Commit 94f87e8

Browse files
committed
Patching arguments parsing in joint.m
1 parent 0037bea commit 94f87e8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

matlab/joint.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
%if the joint variable is only compared with variables using the same samples,
1010
%then arity information is not required
1111

12-
if (~isa(X,'double') || ~isa(arities,'double'))
13-
error('Error, inputs must be double vectors or matrices')
14-
end
1512
if (nargin == 2)
13+
if (~isa(X,'double') || ~isa(arities,'double'))
14+
error('Error, inputs must be double vectors or matrices')
15+
end
1616
[output] = MIToolboxMex(3,X,arities);
1717
else
18+
if (~isa(X,'double'))
19+
error('Error, input must be a double vector or matrix')
20+
end
1821
[output] = MIToolboxMex(3,X);
1922
end

0 commit comments

Comments
 (0)