Originally posted by: SystemAdmin
I need to write a code which update 3D array like below,
A,Y,Z p q r and d are given, each element should be integer.
int O
http://i in 1..phttp://j in 1..qhttp://k in 1..r=[[
http://A,A/(1+d)^1,A/(1+d)^2,....,A/(1+d)^r],[
http:// Y,Y/(1+d)^1,Y/(1+d)^2,....,Y/(1+d)^r],[
http:// Z,Z/(1+d)^1,Z/(1+d)^2,....,Z/(1+d)^r]],
Actually final one would be like this,we know
O[1][1][1]=A;
O[1][1][k]=A/(1+d)^k
Also
O[2][1][1]=Y;
O[2][1][k]=Y/(1+d)^k
Similarly
O[1][2][1]=Z;
O[1][2][k]=Z/(1+d)^k;
Which means each time O[1][1][1],O[1][2][1],O[1][3][1],....,O[1][q][1] and O[2][1][1],O[2][2][1],...O[p][q][1] given
Which means O[m][n][k]=O[m][n][0]/(1+d)^k
For all m and n;
0[m][n][0] are given. I need do update other elements like above, other elements change as a function of k.
Thanks
#DecisionOptimization#MathematicalProgramming-General