I am struggling with this problem for some time and i dont find a solution. I try to plot a heatmap and have read some stuff but the problems are different. I have 3 Vectors:
x = [ -1, 0, 1, -1, 0, 1, 0, -1, 1 ]
y = [ -1, -1, -1, 0, 0, 0, 1, 1, 1 ]
E = [ 3, 1, 4, 1, 5, 9, 6, 2, 5 ]
What i want is a matrix like the one below for the actual plotting:
E_xy = [ [ 3, 1, 4],
[ 1, 5, 9],
[ 2, 6, 5]]
x[0] belongs to y[0] belongs to E[0] and so on.
What is the best/easiest way to do this?
Please note: The ordering of the matrix can not be used (see E[7] and E[8] and the resulting E_xy[2,0] and E_xy[2,1]).