defining a fitting type
Mostrar comentarios más antiguos
I have written a funcion called Even_fit.m and there are 5 coefficients that need to be found from the fit (a,b,c,d,f) and there is one variable N that I want to load from the workspace, which is already fixed before fitting. My question is how I can load this variable in the fit, since when I do:
ft_even = fittype("Even_fit(x,a,b,c,d,f,N)");
It will also take N as a fitting coefficient, which I do not want.
Thank you!
Respuesta aceptada
Más respuestas (1)
Steven Lord
el 12 de En. de 2023
0 votos
See the "Create Custom Nonlinear Models and Specify Problem Parameters and Independent Variables" and "Use Anonymous Functions to Work with Problem Parameters and Workspace Variables" examples on the fittype documentation page.
Categorías
Más información sobre Linear and Nonlinear Regression 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!
