How can I use MATLAB for curve fitting and generating an equation for g(f)?

  • Thread starter Thread starter coffeem
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

This discussion focuses on using MATLAB for curve fitting to derive an equation for the function g(f). The user is utilizing MATLAB's Curve Fitting Tool, as the Basic Fitting function is not available in their version. They require assistance in obtaining a mathematical equation from their data points, squaring the function, and integrating it over specified limits. The user has provided a link to sample data (g_of_f.mat) for reference.

PREREQUISITES
  • Familiarity with MATLAB, specifically the Curve Fitting Tool
  • Understanding of curve fitting techniques and polynomial regression
  • Knowledge of numerical integration methods in MATLAB
  • Basic understanding of functions and their transformations
NEXT STEPS
  • Explore MATLAB's Curve Fitting Tool documentation for detailed usage
  • Learn how to extract fitted coefficients from the Curve Fitting Tool
  • Research MATLAB functions for squaring equations and performing numerical integration
  • Investigate polynomial fitting techniques in MATLAB for better accuracy
USEFUL FOR

This discussion is beneficial for university students, researchers, and anyone involved in data analysis or mathematical modeling using MATLAB, particularly those needing to perform curve fitting and integration tasks.

coffeem
Messages
91
Reaction score
0

Homework Statement



Hi, I am a second year University student in the UK. I am trying to plan my labs and as part of this am trying to work out how I use MATLAB to do some curve fitting. What I wish to do is to get some points and for MATLAB to find me an equation of this curve to a reasonable degree of accuracy. I then need to square this function and finally to integrate it over some limits.

However I have looked up how to do this in a couple of books in my university library and have so far been unable to complete even the first part of this task. In the books which I found on this I am told to use the 'Basic Fitting' function. However the version of MATLAB which I have only has the Curve fitting tool, which does not appear to give me an equation but merely draws a pretty line for me, after around three hours of playing around this is getting somewhat tiresome.

Note - the sample data which I have been trying to use can be downloaded from: http://www.nottingham.ac.uk/~ppzwm/downloadsindex.htm and clicking on the g_of_f.mat link under the Johnson Noise heading. I need to generate the function of g(f). However I would rather that you told me how to do this rather than just providing me with the answer as I have to do this again independently.

Thanks
 
Last edited by a moderator:
Physics news on Phys.org
Hey can someone please give me some pointers for this. I need to have this figured out by tomorrow.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K