I would like to iterate the table for {Q,0,3,1}, {R0,1,5,1}, the values of m=[3.83171, 7.01559, 10.1735, 13.3237, 16.4706, 19.6159, 22.7601, 25.9037] and calculate the corresponding k and Ra. Also, I want to indicate the minimum Ra for each value of R0.
This is the code that I have written, but I don’t seem to get what I’m looking for.
ClearAll["Global`*"]
p = 2;
k[R0_, m_] := R0/m;
Ra[Q_, R0_, m_] := (Q*R0*p)/m;
data = Table[{Q, R0, m, k[R0, m], Ra[Q, R0, m]}, {Q, 1, 3, 1}, {R0, 1, 5, 1}, {m, 3.83171, 7.01559, 1}];
data // Flatten[#, 1] & // Grid;
TableForm[data,TableHeadings -> {{}, {},{}, {"Q", "R0", "m", "k", "Ra"}}]
I’m expecting the output to be something similar to this. Here I have shown the table for Q=1 as an example.