Mercurial > repos > public > sbplib
comparison +grid/evalOn.m @ 171:0e56192f6459 feature/grids
Made evalOn a bit clearer.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 25 Feb 2016 11:17:48 +0100 |
parents | ea8103ad2cc5 |
children | ac8e00883986 |
comparison
equal
deleted
inserted
replaced
170:62b5f3c34bcb | 171:0e56192f6459 |
---|---|
31 if size(f0,2) ~= 1 | 31 if size(f0,2) ~= 1 |
32 error('grid:evalOn:VectorValuedWrongDim', 'A vector valued function must be given as a column vector') | 32 error('grid:evalOn:VectorValuedWrongDim', 'A vector valued function must be given as a column vector') |
33 end | 33 end |
34 | 34 |
35 gf = func(X{:}); | 35 gf = func(X{:}); |
36 gf = reshape(reshape(gf, [g.N, k])', [g.N*k, 1]); % Reorder so that componets sits together. | 36 if k > 1 % Reorder so that componets sits together. |
37 gf = reshape(reshape(gf, [g.N, k])', [g.N*k, 1]); | |
38 end | |
37 end | 39 end |