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

12 vues (au cours des 30 derniers jours)
Erwin Folkesang
Erwin Folkesang le 27 Mar 2014
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.   

Réponses (1)

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

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by