How can I guide lsqnonlin solver function?

3 visualizaciones (últimos 30 días)
Fredrik Wikerman
Fredrik Wikerman el 16 de Mzo. de 2016
Hi, 
I am running an optimization code where it solves inside another function where there are millions of correct answers and I know how the solution should look like but not the exact values. I get a good minimization but weird results, if you guys understand.
so the function I solve is 
function [EIGJ] = solver(u_exp,fi_exp,S,T,nelem,ndof,nnode,node_load,le,EIGJ)
[defl,fi] = calc(S,T,nelem,ndof,nnode,node_load,le,EIGJ);
EI = defl - u_exp; GJ = fi - fi_exp;
EIGJ = [EI, GJ];
where I solve in the main file with
EIGJ_lsq = lsqnonlin(@(EIGJ) solver(u_exp,fi_exp,S,T,nelem,ndof... ,nnode,node_load,le,EIGJ),EIGJ0,[],[],options)
I know that the results of EIGJ_lsq should look something like a parabola and I get crazy plots.
Any one know how I can tell my results to follow a distribution or something?
Any help is appreciated!
Thanks in advance!

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by