Fitting with dependent variable in model expr

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by