# HG changeset patch # User Rik # Date 1341330643 25200 # Node ID 619fedc6ea61b04428393eac68348cdac471d7ef # Parent e437bacb3ef6cd062d4e2df0d2341922f9050347 ppval.m: Small efficiency improvement in determining offsets. * ppval.m: Transpose and repmat smaller object rather than constructing larger object and transposing it. diff --git a/scripts/polynomial/ppval.m b/scripts/polynomial/ppval.m --- a/scripts/polynomial/ppval.m +++ b/scripts/polynomial/ppval.m @@ -68,8 +68,8 @@ ndv = length (dimvec); ## Offsets. - dx = (xi - x(idx))(:); - dx = repmat (dx, [1, prod(d)])'; + dx = (xi - x(idx))(:)'; + dx = repmat (dx, [prod(d), 1]); dx = reshape (dx, dimvec); dx = shiftdim (dx, ndv - 1);