Using fminunc to find coefficients
Show older comments
I have a data table:
x: 0 1 2 3 4 5 6 7 8 9
y: -1 6 13 20 21 19 15 8 -2 -3
I have the functional form of the data to be : y = ax^2 + bx + c
My professor told us that we can use the matlab function fminunc to find the coefficients a, b and c but I can't seem to find any information on how to do this.
I know I can use the fittype and fit commands to do this, but I would like to know if it is possible to use fminunc, and if it is how would I go about it.
Accepted Answer
More Answers (0)
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!