comparison +grid/funcToComponentsTest.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
children
comparison
equal deleted inserted replaced
274:ac8e00883986 275:3ea2ae2a3d15
1 function tests = funcToComponentsTest()
2 tests = functiontests(localfunctions);
3 end
4
5
6 function testScalarGf(testCase)
7 g = getTestGrid();
8 gf_in = [1; 2; 3];
9
10 testCase.verifyEqual(grid.funcToComponents(g, gf_in), gf_in);
11 end
12
13 function testVectorGf(testCase)
14 g = getTestGrid();
15 gf_in = [1; 2; 3; 4; 5; 6];
16 out = [1 2; 3 4; 5 6];
17
18 testCase.verifyEqual(grid.funcToComponents(g, gf_in), out);
19 end
20
21 function g = getTestGrid()
22 g = grid.equidistant(3,{0,2});
23 end