diff --git a/+quantity/Discrete.m b/+quantity/Discrete.m index d4bc33390d548977b28949582d1f6aaca006848f..03fde3a6df93515fa7d98c2ab39a331af1e6d259 100644 --- a/+quantity/Discrete.m +++ b/+quantity/Discrete.m @@ -1491,15 +1491,9 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ... 'rearranging grids failed'); end - if obj(1).domain.isequal(newDomain) - % if the new domain is the same as the old one; the copy of the object can be - % returned and do not do a recalculation of the values. - return - else - [newObj.domain] = deal(newDomain); - for it = 1 : numel(obj) - newObj(it).valueDiscrete = obj(it).on(newDomain); - end + [newObj.domain] = deal(newDomain); + for it = 1 : numel(obj) + newObj(it).valueDiscrete = obj(it).on(newDomain); end end % changeGrid()