Program that asks for a,b,c in a quadratic equation?
6 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
See Also
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!