# HG changeset patch # User rafavzqz # Date 1426499922 0 # Node ID bc4b2fa30da03c562fac333f0c272663fb0a164c # Parent 560f9cfb5db9db89441106fc98b692914c168192 Reshape if the point is given as a row vector diff -r 560f9cfb5db9 -r bc4b2fa30da0 extra/nurbs/inst/nrbeval.m --- a/extra/nurbs/inst/nrbeval.m Wed Mar 11 10:06:32 2015 +0000 +++ b/extra/nurbs/inst/nrbeval.m Mon Mar 16 09:58:42 2015 +0000 @@ -56,7 +56,7 @@ % % Copyright (C) 2000 Mark Spink % Copyright (C) 2010 Carlo de Falco -% Copyright (C) 2010, 2011 Rafael Vazquez +% Copyright (C) 2010, 2011, 2015 Rafael Vazquez % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by @@ -136,6 +136,10 @@ %% tt(3,:) represents the w direction st = size(tt); + if (st(1) ~= 3 && st(2) == 3 && numel(st) == 2) + tt = tt'; + st = size (tt); + end nt = prod(st(2:end)); tt = reshape (tt, [3, nt]); @@ -212,6 +216,10 @@ %% tt(2,:) represents the v direction st = size(tt); + if (st(1) ~= 2 && st(2) == 2 && numel(st) == 2) + tt = tt'; + st = size (tt); + end nt = prod(st(2:end)); tt = reshape (tt, [2, nt]);