Fit with implicit nonlinear function - Matlab

Click For Summary
SUMMARY

The discussion centers on fitting a nonlinear function in MATLAB, specifically where the x data is defined as x = x0 + a/(1 + 4x^2), with 'a' as a fitting parameter. The user successfully determined the 'a' parameter using a brute-force method by adjusting 'a' and measuring the difference between the fitting function F(x, b) and the y data. However, the user seeks assistance in incorporating a second fitting parameter, 'b', into the model. The need for a self-contained code snippet is emphasized to facilitate better assistance from the community.

PREREQUISITES
  • Understanding of nonlinear regression techniques in MATLAB
  • Familiarity with parameter fitting and optimization methods
  • Knowledge of MATLAB syntax and functions for data manipulation
  • Basic understanding of mathematical modeling and curve fitting
NEXT STEPS
  • Research MATLAB's 'lsqcurvefit' function for nonlinear parameter fitting
  • Explore techniques for optimizing multiple parameters in nonlinear models
  • Learn about the 'fminunc' function for unconstrained optimization in MATLAB
  • Investigate methods for visualizing fitting results and residuals in MATLAB
USEFUL FOR

This discussion is beneficial for researchers, data analysts, and engineers who are working with nonlinear data fitting in MATLAB, particularly those dealing with complex models requiring multiple parameters.

Ras9
Messages
15
Reaction score
1
Hi guys! I am trying to fit a function whose x data depends nonlinearly on the parameter of the fit and I am having hard time doing that!
I will explain better: from my experiment I was able to measure my ydata e my x0 array and I know that my xdata are:
x=x0+a/(1+4x^2), with a being a parameter of the fit that I need to find.
After found a I can try to fit my data knowing my fitting function F(x,b) with b another parameter of the fit.
I managed to find a "brute" way to find the best a parameter for my data, by simply making it change and measuring the difference between my fitting function and my ydata. But know that I have to add a second parameter to the fit I really don't know what to do! Any help?
Thanks a lot
 
Physics news on Phys.org
It is difficult to ascertain your problem based on your post. Can you please post a self-contained piece of code instead? Then it will be easier for other people to run your code and help you fix it or add to it.
 
  • Like
Likes   Reactions: BvU

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 5 ·
Replies
5
Views
12K
  • · Replies 9 ·
Replies
9
Views
4K