Least-Squares Approach to Determine Coefficients of Calibration Function (Hot Wire Anemometry Data)

3 views (last 30 days)
I have a list of 50,000 Voltages (taken over time) for 7 Velocities. From this, I calculated the overall mean of the Voltage.
I am supposed to use: 1) a least-squares approach 2) the Voltage mean - to find a calibration function to convert the Voltages into Velocities.
I have been provided with the following (which is based off of King's law) - U = a0 + a1*E + … + ai*E^i + … aM*E^M (in which U = velocity, E = voltage (which I calculated), and I'm assuming the a values are the calibration coefficients)
And have been asked to perform this calibration across values of M and discuss its accuracy as a function of M.
My question is: how can I determine these calibration coefficients / a values in MATLAB?

Answers (1)

Star Strider
Star Strider on 18 Mar 2020
It appears to be a polynomial regression in powers of ‘E’. See if the polyfit function will do what you want. (If so, pay close attention ot the order of the coefficients that the function returns.)
  4 Comments
C W
C W on 18 Mar 2020
I'm struggling to understand how you would set that for loop up. I understand the basic structure of a for loop but am unclear on how you would indicate to go row by row through the [50,000 x 7], making it [1 x 7] and for each time reference the existing [1 x 7] - would you be able to give an example of how to do this?

Sign in to comment.

Categories

Find more on Linear and Nonlinear Regression in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!