Mercurial > forge
changeset 12568:bc4b2fa30da0 octave-forge
Reshape if the point is given as a row vector
author | rafavzqz |
---|---|
date | Mon, 16 Mar 2015 09:58:42 +0000 |
parents | 560f9cfb5db9 |
children | 62a9eeb876a5 |
files | extra/nurbs/inst/nrbeval.m |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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]);