The Issue: I am currently trying to fit 2 parameters to a set of data, but am struggling to set up the code. I will show the code here and explain issues below.
Code: ( I can paste a text version)
My end goal is to fit the equation 'int' to a set of data 'data4' in order to fit values for k1 and k2. In equation int, ExpGrowth is a constant and rate is an equation that depends on functions a[t] and b[t], which I am trying to solve using a system of equations.
I do not understand how to fit int to data4 since int depends on the functions a[t] and b[t], which can only be solved with k1 and k2 entered using NDSolve, which then makes fitting impossible. I can use ParametricNDSolveValue to extract estimates for k1 and k2 from data4, but the fit coming from ParametricNDSolveValue is not for int and a[t] and b[t] are no longer solved in the way that NDSolve was, so fitting is again impossible. I tried entering int into the system of equations along with int[0]=ExpGrowth as the boundary conditions, but this threw errors. I am not sure which of (Parametric)NDSolve(Value) commands I should be using to fit int, so any help with setting this up would be great.
Thanks in advance for anyone who is able to help. I can give more information if needed.