Skip to content

Commit 0b094df

Browse files
committed
Correction to previous patch
1 parent 7753211 commit 0b094df

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

compatibility/setxor_comp.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
y = a(x,:);
2929
else
3030
y = a(x);
31+
if isrow(varargin{1}) && isrow(varargin{2})
32+
y = reshape(y,1,[]);
33+
end
3134
end
3235
% Keep partial output:
3336
z = y;
@@ -52,16 +55,16 @@
5255
y = a(x,:);
5356
else
5457
y = a(x);
58+
if isrow(varargin{1}) && isrow(varargin{2})
59+
y = reshape(y,1,[]);
60+
end
5561
end
5662
% Join partial outputs:
5763
if ~strcmp(varargin{3},'rows') && isrow(varargin{1}) && isrow(varargin{2})
5864
z = horzcat(z, y);
5965
else
6066
z = vertcat(z, y);
6167
end
62-
if size(varargin{1},1)==1 && size(varargin{2},1)==1 % row ouput if first two inputs are rows
63-
z = reshape(z,1,[]);
64-
end
6568
varargout{1} = z;
6669
else
6770
if strcmp(varargin{end},'sorted'), varargin(end) = []; end

0 commit comments

Comments
 (0)