Fitting with dependent variable in model expr

5 ビュー (過去 30 日間)
Niko
Niko 2011 年 2 月 24 日
When trying to combine data taken in two independent experiments, I ran across the following problem when fitting:
z(P) = w(z)*f(P)
w(z) is known in the form of a cfit object, z is the dependent and P the independent from a set of data.
My first thoughts were to invert the function to obtain P(z) rather than z(P) and then to use eval in the model, but I can't figure out the proper way to formulate the fittype model to allow for this sort of behavior.
Does anybody know how to do this? I need a few pointers :)

回答 (1 件)

Niko
Niko 2011 年 2 月 24 日
I solved the first problem by inverting my data, and fitting an inverted function of the form
P(z) = f^-1(z) * g(w(z))
with f,g being the appropriate functions for this transformation. The remaining question is how to do this in matlab:
Fittype with expr (w is a cfit object)
'z/feval(w,z)'
or
'z/w(z)'
throws an error:
is not a valid MATLAB expression,
has non-scalar coefficients, or cannot be evaluated

カテゴリ

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