You are here

Spatial Grid Dispaly Issue

I am trying to display 5x5 matrix ([[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20],[21,22,23,24,25]]) using a spatial grid display helper, when I assign matrix to a spatial grid, it displays one dimensional 25 cells long line with my values there
How can I make it look two dimensional?

Forums: 

Alex, good to hear from you!

The spatial grid display tool is built to accept data with any nested array dimensions. So, when it starts up it displays the message:

Click on the variable containing the positions or IDs of the columns

Then you click on a variable which has the same array format as the one you want to display, but the information tells which column to put each corresponding display value in.

So in your example, if you want your list to display each sublist on a row, then each member of each sublist would display on a different column, and the values for the IDs of the columns would be:
[[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]]

On the other hand if you wanted to display each sublist as a column, the IDs would be:
[[1,1,1,1,1],[2,2,2,2,2],[3,3,3,3,3],[4,4,4,4,4],[5,5,5,5,5]]
Am I making any sense?

Note that if you are in a 5x5 submodel these values are given by index(1) and index(2) respectively.

Hope this helps
--Jasper

Thank you very much
It did work, I was able to show my matrix in a spatial grid helper, moreover I have developed a formula which crates needed dimensions for any nxm matrix
Here it is:
//** To make dimensions for Spatial Grid of any nxm matrix, count[[x]]--rows, count(element([[x]],1))--cols

var=makearray(makearray(place_in(1),count([[nxm_matr]])),count(element([[nxm_matr]],1)))
1. Give this var for positions or IDs question
2. Put your nxm_matr as variable to be displayed