Polynomial with user defined coefficient?

3 views (last 30 days)
I'm having great difficulty on this. I need to create a program involving a third degree polynomial (ax^2+bx^2+c+d), where the user will be the one to input the coefficients (a,b,c,d) based off my polynomial. Then, the user should be able to plot the graph, with the polynomial indicated at the top of it. I don't know where to start with this or which codes to use.
I hope this description makes sense.

Accepted Answer

Henrik
Henrik on 8 Dec 2014
I will suggest breaking the problem into smaller pieces that can be done individually, and then stitching them back together.
You could start by writing a function which takes the polynomial coefficients as input and plots the polynomial.
Add to this that it writes the value of the coefficients at the top (maybe using title?)
Next you could write a function which prompts the user for the these coefficients, and finally a GUI (or whatever else you want) to connect the two.
  1 Comment
Johnny Boy
Johnny Boy on 8 Dec 2014
I will keep that in mind when I work on it tomorrow. Thanks.

Sign in to comment.

More Answers (0)

Categories

Find more on Polynomials 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!