Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a quantity as below,
P[k_0,A_]= A Log [k0].
I want to generate data for this for A={0,10^3} and k0=10^{-11} to 10^{-2} using a Do loop but I don't know how to apply a loop on two variables simultaneously. Can anyone please guide.
$\begingroup$Thanks a lot for your reply. Is there any way to monitor the result during calculations. Since if I apply this trick to some variable which is being integrated then it takes a lot of time, and one cannot find any error or bug occurring during calculations until the final output. On the other hand, we can print the result in loop to monitor and stop the calculations immediately if there is any bug...$\endgroup$
Outer[P[10^#1, #2] &, Range[-11, -2], Range[0, 10^3, 100]]Adjust as required. $\endgroup$P[k0_, A_] := A Log[k0]andres1 = Table[ P[k0, A], {k0, PowerRange[10^-11, 10^-2, 10]}, {A, 0, 10^3, 100}] // N$\endgroup$