please help me write a program for a quadratic formula in matlab telling me the exact command keys
Show older comments
The solutions of the quadratic equation ax2+bx+c=0 are given by the quadratic formula.
The discriminant D=b^2-4ac is used to predict the number of roots. There are three cases:
1. if D>0 there are two real solutions
2. If D= there is one real solution
3.If D<0 there are no real solutions
write a program that performs each of the following tasks:
i.the program prompts the user to input a,b, and c
ii. the program computes the discriminant D which it uses the conditional
if..elseif..else to determine and output the number of solutions
iii.the program should also output the solutions if any
Answers (0)
Categories
Find more on Bayesian Regression 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!