# Math Help - Nonlinear least squares fit to determine Constants in given Formula

1. ## Nonlinear least squares fit to determine Constants in given Formula

So I have the following two equations:

(1) $F = F_0 (C_t - C_b) + F_b C_b$
(2) $Kx^2 - x(KD +KC_t +1) + KD C_t = 0$

Here x = $C_b$

I have a set of data points that is $(F_i, D_i)$

I know $C_t$ as it is a constant.

My question is how do I use a nonlinear least squares method to get values for $F_0 , F_b ,$ and $K$.

What I've tried so far is solving for x in equation (2) using the quadratic formula and likewise solving for $C_b$ in equation (1). From there, I equated the two resulting equations since x = $C_b$ and then solved for F, so I get some equation that is F = $f(K, C_t, F_0 , F_b)$.

Is this even going in the right direction? I am trying to create a MATLab program that will help in solving for these parameters, as it's something I'm going to have to solve for many data sets $(F_i, D_i)$.

Additionally, does anyone have any recommendations for textbooks I can reference in solving a problem like this as I'm at a bit of a loss in trying to solve this?

2. ## Re: Nonlinear least squares fit to determine Constants in given Formula

Originally Posted by tantile
So I have the following two equations:

(1) $F = F_0 (C_t - C_b) + F_b C_b$
(2) $Kx^2 - x(KD +KC_t +1) + KD C_t$

Here x = $C_b$

I have a set of data points that is $(F_i, D_i)$

I know $C_t$ as it is a constant.

My question is how do I use a nonlinear least squares method to get values for $F_0 , F_b ,$ and $K$.

What I've tried so far is solving for x in equation (2) using the quadratic formula and likewise solving for $C_b$ in equation (1). From there, I equated the two resulting equations since x = $C_b$ and then solved for F, so I get some equation that is F = $f(K, C_t, F_0 , F_b)$.

Is this even going in the right direction? I am trying to create a MATLab program that will help in solving for these parameters, as it's something I'm going to have to solve for many data sets $(F_i, D_i)$.

Additionally, does anyone have any recommendations for textbooks I can reference in solving a problem like this as I'm at a bit of a loss in trying to solve this?
Please correct/complete (2) as it is it is just an expression.

CB

3. ## Re: Nonlinear least squares fit to determine Constants in given Formula

Originally Posted by CaptainBlack
Please correct/complete (2) as it is it is just an expression.

CB
Sorry about that! Fixed, it should be equal to 0