Issue using lsqcurvefit function - App Designer
Mostrar comentarios más antiguos
Good morning,
I'm new to App Designer, and I need to solve an optimization problem using the lsqcurvefit function.
I reuse pre-existing calculation codes, I defined a function
F1=myfun_root(app,x,Speed_sample_RPM)
as a private function in the application code. In this same code, I call the lsqcurvefit function in a CallBack Button:
[x,resnorm,residual,exitflag,output] = ...
lsqcurvefit(@myfun_root,app.x0,Speed_sample_RPM_zoom_T,yt_sample_zoom_Total_Nondim,app.lb,app.ub);
All the variables used are defined previously in the code, which I cannot copy/paste here.
When I run the application and click on the button to calculate the interpolation which launches the CallBack including the lsqcurvefit function, I get the error message:
Error using nargin
Function myfun_root does not exist.
While the latter is well defined as a function at the beginning of the program.
I searched on the Q/A of Matlab but I did not find an already existing answer to this concern, of which I do not understand the cause.
Could someone please enlighten me?
I thank you in advance !
1 comentario
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Get Started with Optimization Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!