Program that asks for a,b,c in a quadratic equation?

6 views (last 30 days)
I need to write a program that asks for a, b and c in the quadratic equation
ax^2 + bx + c = 0
... and then solve it with d = b^2 - 4ac and write it according to:
d < 0 --> no real root
d = 0 --> one double root: x=-b/2a
d > 0 --> two roots: x1 = -b-sqrt(d)/2a and x2 = -b+sqrt(d)/2a
______________
I am a complete rookie so a little help on this is very appreciated.
Thank you fellow matlab friends.   

Answers (1)

Image Analyst
Image Analyst on 27 Mar 2014
Have you looked at the example for inputdlg()?

Categories

Find more on Symbolic Math Toolbox 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!