18 views (last 30 days)

Hello everybody, I'm a student really struggling with this college assignment. I'm trying to estimate the parameters needed to fit my experimental data to a model of two differential equations of the form:

I have a set of experimental data for my measured value y, [FeOOH] and [O_3], and obviously time while x is just a variable that came up during the modelling and doesn't have experimental data. However, it's solvable at everypoint after evaluating all the experimental data. I found several similar examples in here, such as:

https://www.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting#comment_89455

Following the advice of @Star Strider, that answered both problems, curiously. My adjustable parameters are those k's you see and the alphabetical letters like a,b,c,f,g,h, etc. I have 84 experimental values for each variable. I literally copied my equations in the sintax he used for the first link and I get the following error:

I'm attaching my code, please run it and see the error, it says the matrix Index exceeds dimensions for the differential equation of dx/dt. I have a hunch that it might be about the number of parameters I'm using is not the number of parameters I'm generating for my initial guess, I considered 18 but I'm gonna recount. If anyone finds it possible to run please comment!

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 3 Comments

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/495824-parameters-estimation-for-a-system-of-differential-equations-gives-error#comment_776397

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/495824-parameters-estimation-for-a-system-of-differential-equations-gives-error#comment_776397

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/495824-parameters-estimation-for-a-system-of-differential-equations-gives-error#comment_776585

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/495824-parameters-estimation-for-a-system-of-differential-equations-gives-error#comment_776585

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/495824-parameters-estimation-for-a-system-of-differential-equations-gives-error#comment_776698

⋮## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/495824-parameters-estimation-for-a-system-of-differential-equations-gives-error#comment_776698

Sign in to comment.