Polynomial with user defined coefficient?

2 Ansichten (letzte 30 Tage)
Johnny Boy
Johnny Boy am 8 Dez. 2014
Kommentiert: Johnny Boy am 8 Dez. 2014
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.

Akzeptierte Antwort

Henrik
Henrik am 8 Dez. 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 Kommentar
Johnny Boy
Johnny Boy am 8 Dez. 2014
I will keep that in mind when I work on it tomorrow. Thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Polynomials finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by