Mercurial > repos > public > sbplib
diff reshapeToPlotMatrix.m @ 163:51aaf67a7df5 feature/grids
Fixed naming and added functions for converting vectors to matrices for structured grid.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 22 Feb 2016 13:55:19 +0100 |
parents | c75c03f692b3 |
children |
line wrap: on
line diff
--- a/reshapeToPlotMatrix.m Mon Feb 22 13:34:50 2016 +0100 +++ b/reshapeToPlotMatrix.m Mon Feb 22 13:55:19 2016 +0100 @@ -1,10 +1,7 @@ % Takes a grid function and reshapes it into a matrix of shape m for plotting. -% Called by class methods. -function F = funcToPlotMatrix(gf, m) +function F = reshapeToPlotMatrix(gf, m) D = length(m); - - switch D case 1 F = gf; @@ -15,6 +12,6 @@ p = [2 3 1]; % Permuation F = permute(reshape(gf,rot90(m,2)), p); otherwise - error('grid:funcToMatrix:NotImplemented','Grid function to matrix is not implemented for dimension = %d', length(m)); + error('reshapeToPlotMatrix:NotImplemented','Grid function to matrix is not implemented for dimension = %d', length(m)); end end \ No newline at end of file