How to limit variable range with cftool interactive curve fitting toolbox?

9 ビュー (過去 30 日間)
Nathan
Nathan 2015 年 3 月 16 日
コメント済み: Nathan 2015 年 3 月 16 日
I am trying to use cftool to model experimental data using a given theoretical equation to calculate the two unknown parameters. I can input everything and insert the custom equation but I don't know how to force the tool to have a range of x from 0 to infinity and yo from 0 to infinity instead of both being infinity to infinity. The experimental variables cannot be negative numbers. I don't need bounds around the calculated coefficients however.

採用された回答

John D'Errico
John D'Errico 2015 年 3 月 16 日
A quick look at the FITOPTIONS function gives the answer.
Both the linear and nonlinear least squares methods allow lower and upper bounds to be placed on your parameters.
help fitoptions
Were this NOT an option, then you could still solve the problem simply by squaring that parameter inside your model. Until the supreme court has ruled against this, the square of a number is always positive. They might do so though any day now, so beware. :)
  1 件のコメント
Nathan
Nathan 2015 年 3 月 16 日
I forgot about regular old math manipulation. Thanks for the help I just did it the square method. Thanks for the help and quick reply.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by