diff +grid/evalOn.m @ 582:ce44af8d7dd1 feature/grids

Rename grid.EmptyGrid to grid.Empty
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 07 Sep 2017 10:21:15 +0200
parents 4c3f55a628c8
children d196b7cdc626
line wrap: on
line diff
--- a/+grid/evalOn.m	Thu Sep 07 09:54:45 2017 +0200
+++ b/+grid/evalOn.m	Thu Sep 07 10:21:15 2017 +0200
@@ -27,7 +27,11 @@
     x = num2cell(g.points());
 
     % Find the number of components
-    x0 = x(1,:);
+    if size(x,1) ~= 0
+        x0 = x(1,:);
+    else
+        x0 = num2cell(ones(1,size(x,2)));
+    end
     f0 = func(x0{:});
     k = length(f0);