Hello: I have 2D matrix of floats M
0 0 0 0 1.5625
0 0 0 0 3.125
0 0 0 0 6.25
0 0 0 0 12.5
0 0 0 0 25
3.125 6.25 12.5 25 50
I could compute the last row and the last column using q:
M[r-1;]:{2*x}[c-1;M[r-1;0]]
M[;c-1]:reverse({0.5*x}[r-1;M[r-1;c-1]])
But now I have to compute the rest of the cells backwards by rows or by columns as each cell is the sum of the cells in the same row or lower rows of the next column minus the sum of the cells in lower rows of the same column divided by 2:
M[4,3]<- 0.5*(Sum(M[4,4],M[5,4])-Sum(M[5,3]))
M[3,3]<- 0.5*(Sum(M[3,4],M[4,4],M[5,4])-Sum(M[4,3],M[5,3]))
c is the number columns (5) and r is the number of rows (6) in the matrix but c and r are variable
This is too advanced for me. Please can you help me giving me a hint?
Cheers
Francisco