Don't ask my why (although you'll see why in the next Spatial Recipe), but I had a requirement to take a Table with n rows in it and convert to a n x n Matrix where each column contains the values from the original Table. In other words, this...
...needed to be turned into this...
So I reviewed these two previous Spatial Recipes...
Filter an Image n Times using the Iterator Operator 2016
...and came up with the following Snippet that can be re-used in larger models
smear_table_to_matrix.gmdx |
Iterator for Matrix Filenames |
Iterator to populate Matrix |
If you wanted to insert this into a larger model what I would suggest is to select everything apart from the input Matrix and the output Report operators (far left and far right of the model) and click Create Submodel. Select just that sub-model, right click and select Copy and then you can Paste it into other models as a re-usable "operator"
Apparently there's a much simpler way to achieve this:
smear_table_to_matrix_v16_5_1.gmdx |
This approach is used in the Table to Matrix submodels of the "Report Factor Loadings (Correlation) between Principal Components and Input Bands" article: