FillMatrix(XRange,YRange,Matrix,[InterpMethod])
Fills missing values in a matrix by 2D interpolation. XRange and YRange are numeric row and column labels. The optional parameter InterpMethod specifies how the missing values are interpolated from the known values. It can take values 1 (row-dominated iterpolation), 2 (column-dominated interpolation) or 3 (average of row and column-dominated interpolation). If not specified then it defaults to 1.
Matrix
| |
|
|
|
|
|
|
|
|
| |
YRange\XRange |
1 |
2 |
3 |
4 |
5 |
6 |
|
| |
1 |
|
|
|
|
|
|
|
| |
2 |
|
2 |
|
4 |
|
|
|
| |
3 |
|
|
|
|
5 |
|
|
| |
4 |
|
|
6 |
|
|
|
|
| |
5 |
|
8 |
|
10 |
|
|
|
| |
6 |
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
InterpMethod=1
| |
|
|
|
|
|
|
|
|
| |
|
1 |
2 |
3 |
4 |
5 |
6 |
|
| |
1 |
2 |
2 |
3 |
4 |
4 |
4 |
|
| |
2 |
2 |
2 |
3 |
4 |
4 |
4 |
|
| |
3 |
5 |
5 |
5 |
5 |
5 |
5 |
|
| |
4 |
6 |
6 |
6 |
6 |
6 |
6 |
|
| |
5 |
8 |
8 |
9 |
10 |
10 |
10 |
|
| |
6 |
8 |
8 |
9 |
10 |
10 |
10 |
|
| |
|
|
|
|
|
|
|
|
|
InterpMethod=2
| |
|
|
|
|
|
|
|
|
| |
|
1 |
2 |
3 |
4 |
5 |
6 |
|
| |
1 |
2 |
2 |
6 |
4 |
5 |
5 |
|
| |
2 |
2 |
2 |
6 |
4 |
5 |
5 |
|
| |
3 |
4 |
4 |
6 |
6 |
5 |
5 |
|
| |
4 |
6 |
6 |
6 |
8 |
5 |
5 |
|
| |
5 |
8 |
8 |
6 |
10 |
5 |
5 |
|
| |
6 |
8 |
8 |
6 |
10 |
5 |
5 |
|
| |
|
|
|
|
|
|
|
|
|
InterpMethod=3
| |
|
|
|
|
|
|
|
|
| |
|
1 |
2 |
3 |
4 |
5 |
6 |
|
| |
1 |
2 |
2 |
4.5 |
4 |
4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