Question: Curve fitting on multiple data series

Hello,

 

I have two sets of data representing two function that depends on x with a parameter A.

I need to do a fit on both data series at the same time so to fit with the best parameter A.

 

Here is how I do a fit on one function

 

> f(x):=A*cos(x-B)^(2);               
> g(x):=A*(cos(x-C)^(2)+ sin(x-C)^(2))^2; 
> fit1 := Fit(f(x), r, x, parameternames = [A, B, C], initialvalues = [A = 2, B = .767944711, C = 1.48965411]);
Please Wait...