08-Jan-2022 09:34:51 simplex_grid_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test simplex_grid(). SIMPLEX_GRID_TEST01: SIMPLEX_GRID_SIZE counts the points in a regular grid with N+1 points on a side, in an M-dimensional simplex. M: 0 1 2 3 4 5 N: 0: 1 1 1 1 1 1 1: 1 2 3 4 5 6 2: 1 3 6 10 15 21 3: 1 4 10 20 35 56 4: 1 5 15 35 70 126 5: 1 6 21 56 126 252 6: 1 7 28 84 210 462 7: 1 8 36 120 330 792 8: 1 9 45 165 495 1287 9: 1 10 55 220 715 2002 10: 1 11 66 286 1001 3003 SIMPLEX_GRID_TEST02: SIMPLEX_GRID_INDEX_NEXT lists, one by one, the indices of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. #: 1 2 3 (*) 0: 0 0 0 ( 3) 1: 0 0 1 ( 2) 2: 0 0 2 ( 1) 3: 0 0 3 ( 0) 4: 0 1 0 ( 2) 5: 0 1 1 ( 1) 6: 0 1 2 ( 0) 7: 0 2 0 ( 1) 8: 0 2 1 ( 0) 9: 0 3 0 ( 0) 10: 1 0 0 ( 2) 11: 1 0 1 ( 1) 12: 1 0 2 ( 0) 13: 1 1 0 ( 1) 14: 1 1 1 ( 0) 15: 1 2 0 ( 0) 16: 2 0 0 ( 1) 17: 2 0 1 ( 0) 18: 2 1 0 ( 0) 19: 3 0 0 ( 0) SIMPLEX_GRID_TEST03: SIMPLEX_GRID_INDEX_SAMPLE returns a randomly selected index of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. #: 1 2 3 (*) 1: 0 3 0 ( 0) 2: 1 0 2 ( 0) 3: 1 1 0 ( 1) 4: 1 1 1 ( 0) 5: 2 0 0 ( 1) 6: 0 0 3 ( 0) 7: 1 0 1 ( 1) 8: 0 1 1 ( 1) 9: 2 0 0 ( 1) 10: 2 1 0 ( 0) 11: 0 0 2 ( 1) 12: 0 2 0 ( 1) 13: 2 0 1 ( 0) 14: 2 0 0 ( 1) 15: 0 3 0 ( 0) 16: 0 2 0 ( 1) 17: 0 1 0 ( 2) 18: 0 0 2 ( 1) 19: 0 2 0 ( 1) 20: 1 2 0 ( 0) SIMPLEX_GRID_TEST04: SIMPLEX_GRID_INDEX_TO_POINT returns the physical point corresponding to a grid index of a simplex grid that that uses N+1 points on a side, in an M-dimensional simplex. Simplex vertices: Row: 1 2 Col 1: 20 0 2: 30 40 3: 10 20 Choosing random simplex indices to convert: #: 1 2 3 X Y 1: 3 0 2 16.0000 8.0000 2: 1 3 1 24.0000 28.0000 3: 1 3 1 24.0000 28.0000 4: 0 2 3 18.0000 28.0000 5: 0 0 5 10.0000 20.0000 6: 1 4 0 28.0000 32.0000 7: 1 4 0 28.0000 32.0000 8: 0 3 2 22.0000 32.0000 9: 1 4 0 28.0000 32.0000 10: 1 0 4 12.0000 16.0000 SIMPLEX_GRID_TEST05: SIMPLEX_GRID_INDEX_ALL returns all the indices of a simplex grid that uses N+1 points on a side, in an M-dimensional simplex. Transposed Simplex Grid Index Matrix: Row: 1 2 3 4 Col 1: 0 0 0 3 2: 0 0 1 2 3: 0 0 2 1 4: 0 0 3 0 5: 0 1 0 2 6: 0 1 1 1 7: 0 1 2 0 8: 0 2 0 1 9: 0 2 1 0 10: 0 3 0 0 11: 1 0 0 2 12: 1 0 1 1 13: 1 0 2 0 14: 1 1 0 1 15: 1 1 1 0 16: 1 2 0 0 17: 2 0 0 1 18: 2 0 1 0 19: 2 1 0 0 20: 3 0 0 0 SIMPLEX_GRID_TEST06: SIMPLEX_GRID_INDEX_TO_POINT returns the physical point corresponding to a grid index of a simplex grid that that uses N+1 points on a side, in an M-dimensional simplex. Simplex vertices: Row: 1 2 Col 1: 20 0 2: 30 40 3: 10 20 Grid Point Coordinates: Row: 1 2 Col 1: 10 20 2: 14 24 3: 18 28 4: 22 32 5: 26 36 6: 30 40 7: 12 16 8: 16 20 9: 20 24 10: 24 28 11: 28 32 12: 14 12 13: 18 16 14: 22 20 15: 26 24 16: 16 8 17: 20 12 18: 24 16 19: 18 4 20: 22 8 21: 20 0 simplex_grid_test(): Normal end of execution. 08-Jan-2022 09:34:51