Solve a Problem using Optimization Function

Initially, I have I have five points plotted on the graph and I have a 4th-degree polynomial equation which its coefficients are initialized with zeros and also plotted on the same graph. Now I would like to start an optimization process that passes a value let's say 1.4901e-08 to each of the coefficients from lowest to the highest power of the equation(1.4901e-08 + 0^x + ... and then 0 + 1.4901e-08 x^2 + ...). Is there any optimization function that can do that? If not, how can I do this process? Thanks.

2 Comments

Not clear what you are trying to do.
Firstly I have an equation with zero coefficients (0 + 0*x + 0*x.^2 + 0*x.^3 + 0*x.^4).
And then it waits for a keyboard input to pass 1.4901e-08 to the first coefficient.
It pauses again and waits for another keyboard input to pass the value to the second coefficient. The process goes on until to the last coefficient. It should be:
0 + 0*x + 0*x.^2 + 0*x.^3 + 0*x.^4
0 + 1.4901e-08*x + 0*x.^2 + 0*x.^3 + 0*x.^4
0 + 0*x + 1.4901e-08*x.^2 + 0*x.^3 + 0*x.^4
...

Answers (0)

This question is closed.

Asked:

on 5 Nov 2018

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!