Commit b7788f16 authored by fpa's avatar fpa

property nPoints is now correct when creating an empty itaOrientation object

parent f36951b8
...@@ -40,7 +40,7 @@ classdef itaOrientation ...@@ -40,7 +40,7 @@ classdef itaOrientation
% ita_vu2quat, ita_vu2rpy, itaOptitrack % ita_vu2quat, ita_vu2rpy, itaOptitrack
% %
% Author: Florian Pausch, fpa@akustik.rwth-aachen.de % Author: Florian Pausch, fpa@akustik.rwth-aachen.de
% Version: 2018-05-04 % Version: 2018-05-14
% %
% <ITA-Toolbox> % <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved. % This file is part of the ITA-Toolbox. Some rights reserved.
...@@ -196,7 +196,11 @@ classdef itaOrientation ...@@ -196,7 +196,11 @@ classdef itaOrientation
function value = get.nPoints(this) function value = get.nPoints(this)
% get number of stored orientations [double] % get number of stored orientations [double]
value = size(this.mOrient,2); if size(this.mOrient,1)==0
value = 0;
else
value = size(this.mOrient,2);
end
end end
...@@ -360,10 +364,8 @@ classdef itaOrientation ...@@ -360,10 +364,8 @@ classdef itaOrientation
end end
function this = n(this,index) function this = n(this,index)
% Replace by content of chosen index n
% error check: do nothing, if out of bound or nothing given % error check: do nothing, if out of bound or nothing given
if nargin < 2 || isempty(this.mOrient), return; end; if nargin < 2 || isempty(this.mOrient), return; end;
this.mOrient = this.mOrient(1,index); this.mOrient = this.mOrient(1,index);
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment