fitting using fitnlm with bounded parameters

5 ビュー (過去 30 日間)
Steven Sagona
Steven Sagona 2018 年 6 月 26 日
コメント済み: Steven Sagona 2018 年 7 月 13 日
I would like to estimate the amplitude and phase of a set of noisy data that should follow the model A sin(wt+phase) .
I can do this with NonLinearModel.fit, but it's not obvious how I can provide bounds on my parameters (phase should be between 0 and 2pi and the amplitude should be positive).
I have read that these nonlinear fitting functions cannot apply constraints to the model. Is this true that there's no way to use these nonlinear fitting methods with bounds on the parameters?

採用された回答

Torsten
Torsten 2018 年 6 月 26 日
編集済み: Torsten 2018 年 6 月 26 日
It's not necessary to include bound options for your problem.
"phase" can be easily adjusted to lie between 0 and 2*pi, and "w" can be replaced by "w^2" in your model:
A*sin(w^2*t+mod(phase,2*pi))
Best wishes
Torsten.
  1 件のコメント
Steven Sagona
Steven Sagona 2018 年 7 月 13 日
This works for what I asked for. Thank you. Any ideas what I can do if I want to give my frequency a range? (So for example, I want it to be between 40 & 50)?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSupport Vector Machine Regression についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by