diff extra/nurbs/inst/nrbdeval.m @ 12567:560f9cfb5db9 octave-forge

Consistent output in the univariate case
author rafavzqz
date Wed, 11 Mar 2015 10:06:32 +0000
parents 37d08939bb7b
children
line wrap: on
line diff
--- a/extra/nurbs/inst/nrbdeval.m	Tue Mar 10 20:58:29 2015 +0000
+++ b/extra/nurbs/inst/nrbdeval.m	Wed Mar 11 10:06:32 2015 +0000
@@ -166,14 +166,20 @@
   [cup,cuw] = nrbeval (dnurbs,tt);
   temp1 = cuw(ones(3,1),:);
   jac = (cup-temp1.*pnt)./temp;
+  if (iscell (tt))
+    jac = {jac};
+  end
 
   % second derivative
   if (nargout == 3 && exist ('dnurbs2'))
     [cuup,cuuw] = nrbeval (dnurbs2, tt);
     temp2 = cuuw(ones(3,1),:);
     hess = (cuup - (2*cup.*temp1 + cp.*temp2)./temp + 2*cp.*temp1.^2./temp.^2)./temp;
+    if (iscell (tt))
+      hess = {hess};
+    end
   end
-
+  
 end
 
 varargout{1} = pnt;