1ds19

10 Reputation

2 Badges

9 years, 67 days

MaplePrimes Activity


These are replies submitted by 1ds19

Thank you very much for your answer Carl Love, your solution worked effectively. I was confused about the square-bracket mathematical indexing and the round-bracket programmer indexing, and referred to the maple help sheet which explained that both work similarly with arrays, although the programmer indexing is always referred back to 1. When defining a variable in a loop, I tend to use the mathematical index because the programmer one prompts for a function definition or table assignment. Although if I'm defining an array by a computation of other arrays (usually the case in my current model of oxidation batch reactors), I'll refer to those arrays so as not to display the square brackets when the calculations are printed on screen, i.e.:

for i from a to b do oxidation_temp[i]:=oxidation_temp[i+1]-mass_solution(i)*specific_heat(i)*time(i):end do:

Is this the correct approach?

Thank you very much for your answer Carl Love, your solution worked effectively. I was confused about the square-bracket mathematical indexing and the round-bracket programmer indexing, and referred to the maple help sheet which explained that both work similarly with arrays, although the programmer indexing is always referred back to 1. When defining a variable in a loop, I tend to use the mathematical index because the programmer one prompts for a function definition or table assignment. Although if I'm defining an array by a computation of other arrays (usually the case in my current model of oxidation batch reactors), I'll refer to those arrays so as not to display the square brackets when the calculations are printed on screen, i.e.:

for i from a to b do oxidation_temp[i]:=oxidation_temp[i+1]-mass_solution(i)*specific_heat(i)*time(i):end do:

Is this the correct approach?

[I deleted the extra copies of your worksheet, assuming that the last one that you posted (this) is the one that you wanted to post.-- Carl Love as moderator]

Here is the worksheet; thanks for your interest

Full_Model_Evaluatio.mw

Hi Carl Love, thanks a lot for your fix, worked perfectly! I`ll remember that one for next time. Have a good day.

 

Drew

Hi Carl Love, thanks a lot for your fix, worked perfectly! I`ll remember that one for next time. Have a good day.

 

Drew

Page 1 of 1