Mercurial > repos > public > sbplib
view +grid/funcToComponentsTest.m @ 574:f8072bb8d1d1 feature/grids
Add functions for symmetric and skew parts of matrix
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 04 Sep 2017 17:50:27 +0200 |
parents | 3ea2ae2a3d15 |
children |
line wrap: on
line source
function tests = funcToComponentsTest() tests = functiontests(localfunctions); end function testScalarGf(testCase) g = getTestGrid(); gf_in = [1; 2; 3]; testCase.verifyEqual(grid.funcToComponents(g, gf_in), gf_in); end function testVectorGf(testCase) g = getTestGrid(); gf_in = [1; 2; 3; 4; 5; 6]; out = [1 2; 3 4; 5 6]; testCase.verifyEqual(grid.funcToComponents(g, gf_in), out); end function g = getTestGrid() g = grid.equidistant(3,{0,2}); end