I'm using two nested Table
to generate data which depend on two parameters, let's say it is temperature and pressure, many times in my code. When I change the temp and pressure values in calculations, I have to manually change it in all of the nested ``Table```.
Here's simple example:
Table[Table[temp + press, {temp, 200, 500, 100}], {press, 1, 4}]
(* Out: {{201, 301, 401, 501}, {202, 302, 402, 502}, {203, 303, 403,
503}, {204, 304, 404, 504}} *)
Is there any way to define firstly parts of tables {temp, 200, 500, 100}
and {press, 1, 4}
and just use it as a variable at all tables? Or any other construct that will help me to avoid changing all the parameters?
I've seen such a code a while ago but I cant find this right now.