comparison +grid/evalOn.m @ 277:4c3f55a628c8 feature/beams

Made evalOn give more error message.
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 07 Sep 2016 13:47:05 +0200
parents 30321dc180e1
children ce44af8d7dd1
comparison
equal deleted inserted replaced
276:30321dc180e1 277:4c3f55a628c8
13 13
14 gf = repmat(func,[g.N, 1]); 14 gf = repmat(func,[g.N, 1]);
15 return 15 return
16 end 16 end
17 % func should now be a function_handle 17 % func should now be a function_handle
18
19 if g.D ~= nargin(func)
20 g.D
21 nargin(func)
22 error('grid:evalOn:WrongNumberOfInputs', 'The number of inputs of the function must match the dimension of the domain.')
23 end
24
18 25
19 % Get coordinates and convert to cell array for easier use as a parameter 26 % Get coordinates and convert to cell array for easier use as a parameter
20 x = num2cell(g.points()); 27 x = num2cell(g.points());
21 28
22 % Find the number of components 29 % Find the number of components