How to do curve fitting to a custom model with two independent variables?

3 ビュー (過去 30 日間)
wahab maqbool
wahab maqbool 2015 年 5 月 24 日
コメント済み: Matt J 2015 年 5 月 28 日
I have data in which response is dependent upon two variables. Three data series are given:[x1, y1], [x2, y2], [x3, y3]. On excel (file attached) I have made XY scatter plot which gives three response curves. I want to fit these 3 curves to a custom model in the form: lnY = k*lnX + (a/T) + b This model is used to describe such data in our field. I just don't know how I will fit all three curves to this model? Please help!

回答 (1 件)

Matt J
Matt J 2015 年 5 月 24 日
編集済み: Matt J 2015 年 5 月 24 日
The independent variables are X and T? If you insist on using the Curve Fitting Toolbox, the thing to do would be to regard this as a surface in X and T and use sfit().
It is noteworthy, though, that your model is linear lnX and 1/T. So, you could really probably do a simple linear fit with mldivide(). In other words, just solve the linear equations for k, a, and b using normal linear algebraic operations.
  2 件のコメント
wahab maqbool
wahab maqbool 2015 年 5 月 25 日
@Matt J, yes X and T are independent variables. But can you please show how to fit this data to the model I provided? I mean, I have to fit it on that model. please help!
Matt J
Matt J 2015 年 5 月 28 日
What happened when you tried sfit()?

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

カテゴリ

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