Optimizing coefficients of an asymptotic series using lsqnonlin.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I am trying to find the coefficients of an asymtotic series using experimental and simulation data with lsqnonlin but the results are not making any sense. I never used lsqnonlin before. I am not sure about what should be put as initial guess as I never worked with optimization problems before but from the literature, value of coefs(5) should be around 150. (displacements need to be divided by 1000 to make the units similar). Any suggestions regarding how to approach the problem? I have attached the relevant mat file along with the code.
unew = fillmissing(uselected_data,'movmedian',50); %to fill NaN values
vnew = fillmissing(vselected_data,'movmedian',50); %to fill NaN values
uv = unew +i*vnew;
options = optimoptions('lsqnonlin','Display','iter');
x00 = rand(9,1); %unknown coefficients of asymptotic series.
fun = @(x) (uv - (omega + i*gamma)*x) %Omega and Gamma are the values with
coefs = lsqnonlin(fun,x00,[],[],options)
2 Commenti
Risposte (1)
Matt J
il 3 Set 2019
The problem looks very linear to me. I would just do,
coefs=(omega + i*gamma)\uv
1 Commento
Vedere anche
Categorie
Scopri di più su Optimization Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!