Mercurial > repos > public > sbplib
comparison +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 |
comparison
equal
deleted
inserted
replaced
581:00261f8d7e15 | 582:ce44af8d7dd1 |
---|---|
25 | 25 |
26 % 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 |
27 x = num2cell(g.points()); | 27 x = num2cell(g.points()); |
28 | 28 |
29 % Find the number of components | 29 % Find the number of components |
30 x0 = x(1,:); | 30 if size(x,1) ~= 0 |
31 x0 = x(1,:); | |
32 else | |
33 x0 = num2cell(ones(1,size(x,2))); | |
34 end | |
31 f0 = func(x0{:}); | 35 f0 = func(x0{:}); |
32 k = length(f0); | 36 k = length(f0); |
33 | 37 |
34 if size(f0,2) ~= 1 | 38 if size(f0,2) ~= 1 |
35 error('grid:evalOn:VectorValuedWrongDim', 'A vector valued function must be given as a column vector') | 39 error('grid:evalOn:VectorValuedWrongDim', 'A vector valued function must be given as a column vector') |