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

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)

Have you looked at the example for inputdlg()?

Categories

Asked:

on 27 Mar 2014

Answered:

on 27 Mar 2014

Community Treasure Hunt

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

Start Hunting!