Dimension mismatch error

I didn’t run the code, but I’m guessing that mass_r2, mass_r3, and mass_r4 all have different lengths compared to mass_r1 (which has the same length as time and temp.

You can evaluate an ODESolution at given a given timepoint by calling e.g., sol1(t). Thus, you could construct

mass_r2 = [sol2(ti)[1] for ti in time]

and make the other objects in a similar manner. The odesolver will not in general take the same timesteps when you change the input in some way (in your case the parameter set)

2 Likes