I would like to generate a code which emulate the calculations that are being perfom in columns A and B and row 7 to 12 in the attached first image. The results of those calculations are those shown in the second image. Please notice that "0" and "50" in Colum A and B and row 6 are simply the initial values to perform the calculations.

I am not interested in importing the values but rather generate a code which does the same and where I can obtain column A and B (including 0 and 50) as lists. Thank you very much in advanced,

Edit: I would appreciate if the code could be general (such as a loop) as in the case if there more rows. Also it is only neccesary to generate a list column A and B only from row 5 on.

Image 1

Image 2

  • $\begingroup$ In a better world, someone could add a TableView-based solution here :) $\endgroup$
    – user5601
    Commented Apr 29, 2020 at 23:58

2 Answers 2


Is this close enough?

{" "," "},
{"Time(s)", "T[C]"},

or this

{" "," "},
{"Time(s)", "T[C]"},

but I suspect that you can easily keep adding more requirements or writing more complicated cross referencing formulas in your spread sheet to break any answer.

  • $\begingroup$ thank you very much. It is. But do you know how to make it more general like in a loop or something?. In other words, if I had more than 12 rows then it will be difficult to write down every formula for each row. I would appreciate if you can help me with this! $\endgroup$
    – John
    Commented Apr 29, 2020 at 20:48
  • $\begingroup$ your code is great and it works excelent for my purposes! I really appreaciate your help. $\endgroup$
    – John
    Commented Apr 29, 2020 at 21:03

This is simply a translation of the recursive rules indicated:

  {step = 0.001, p = 1000},
    Apply[{#1 + step, ((#2 + 273.15) - p*(#1 + step)) - 273.15} &], 
    {0, 50}, 

(* Out:
{{0, 50}, {0.001, 49.}, {0.002, 47.}, {0.003, 44.}, 
 {0.004, 40.}, {0.005, 35.}, {0.006, 29.}}
  • $\begingroup$ this code is great and it also works excelent for my purposes! I really appreaciate your help as well. I am glad that now I have two ways of doing it ! $\endgroup$
    – John
    Commented Apr 29, 2020 at 21:04
  • $\begingroup$ @John Glad it helped! $\endgroup$
    – MarcoB
    Commented Apr 29, 2020 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.