Polynomial with user defined coefficient?

2 次查看(过去 30 天)
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.

采纳的回答

Henrik
Henrik 2014-12-8
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Polynomials 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by