Mercurial > repos > public > sbplib
comparison +grid/evalOn.m @ 592:4422c4476650 feature/utux2D
Merge with feature/grids
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Mon, 11 Sep 2017 14:17:15 +0200 |
parents | ce44af8d7dd1 |
children | d196b7cdc626 |
comparison
equal
deleted
inserted
replaced
591:39554f2de783 | 592:4422c4476650 |
---|---|
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') |