フィルターのクリア

Fitting multiple datasets to non-linear coupled ODE's - fminsearch

5 ビュー (過去 30 日間)
Alistair McQueen
Alistair McQueen 2020 年 11 月 26 日
コメント済み: Alistair McQueen 2020 年 11 月 26 日
I have attached my code for reference.
Essentially, I have two datasets: ch and cm; the former has an additional datapoint (a 12th day).
There are two unknown parameters, beta1 and beta2.
Essentially I want to fit my model to these datasets simultaneously, where I use the least-squares difference method to calculate the error [line 85-95].
When fitting to a single dataset, I understand the aim is to minimise the error. However, in this case I (maybe naively) have just computed a total error by adding these two together.
The code runs perfectly fine, I just wanted to make sure I was doing things correctly.

回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 11 月 26 日
Why not just use
errT=norm(cellHND - chND)+norm(cellLND - clND);
instead of looping through the sums.
  1 件のコメント
Alistair McQueen
Alistair McQueen 2020 年 11 月 26 日
Honestly, I am not sure. Thanks though, yields a similar result, varying (I assume) depending on the error calculation used.
I assume this is an adequate way to calculate the total error when considering a fit to multiple datasets?
As my most recent approach to modelling the error is:
errT = sum((((ch(j)-cellH(j))/ch(j))).^2 + (((cl(j)-cellL(j))/cl(j))).^2);

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by