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.
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Polynomials 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!