diff +grid/evalOnScalar.m @ 275:3ea2ae2a3d15 feature/beams

Improvments to eval on grids. Added function to extrac components of a vector gf.
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 06 Sep 2016 17:28:11 +0200
parents f688e2bdb74a
children
line wrap: on
line diff
--- a/+grid/evalOnScalar.m	Tue Sep 06 15:54:45 2016 +0200
+++ b/+grid/evalOnScalar.m	Tue Sep 06 17:28:11 2016 +0200
@@ -1,3 +1,5 @@
+% WHAT KIND OF A FUNCTION NAME IS THIS?!
+%  This functions send matrixa arguments to func unlike grid.evalOn()
 % Takes a funciton and evaluates it on a grid to return a grid function in the
 % form of a (n*k)x1 vector, where n is the number of grid points and k is the
 % number of components of the function.
@@ -8,7 +10,7 @@
     if ~isa(func, 'function_handle')
         % We should have a constant.
         if size(func,2) ~= 1
-            error('grid:evalOn:VectorValuedWrongDim', 'A vector valued function must be given as a column vector')
+            error('grid:evalOnScalar:VectorValuedWrongDim', 'A vector valued function must be given as a column vector')
         end
 
         gf = repmat(func,[g.N, 1]);
@@ -29,7 +31,7 @@
     k = length(f0);
 
     if size(f0,2) ~= 1
-        error('grid:evalOn:VectorValuedWrongDim', 'A vector valued function must be given as a column vector')
+        error('grid:evalOnScalar:VectorValuedWrongDim', 'A vector valued function must be given as a column vector')
     end
 
     gf = func(X{:});