I have the following problem. I have a table, call it m, which is labelled by 3 indices (say i,j,k), each of them running from 1 up to 100. I would like to be able to construct a new table which would consist of elements taken from m under the following condition:
For any p, such that 2 < p < 301
, construct the table consisting of pairs, where the first term in all pairs for a given p is always the same equal p*0.06
Table[{0.06*p, m[[i, j, k]]}, {p, 2, 301}] WITH THE CONSTRAINT i + j + k = p
It is the constraint which puzzles me.
I would also like to plot all these Lists on one graph (using ListPlot
?). I managed to do something like this for a table with two indices using a Do
loop, but for three indices, it seems I would have to use a double loop and I don't know how to do that.
Looking forward to any suggestions!
FrobeniusSolve[]
orIntegerPartitions[]
for generating the indices that can be fed intom
. $\endgroup$