
I have a question about the Quadratic formula on Matlab. How can I use of IF statement for this formula and how can I find third and fourth output. For example, for a=6 b=5 c=-4.
3 views (last 30 days)
Show older comments
I have a question about the Quadratic formula on Matlab.
How can I use of IF statement for this formula and how can I find third and fourth output. For example, for a=6 b=5 c=-4.
0 Comments
Answers (1)
darova
on 3 May 2020
Use this formula

if D == 0
x = -b/2/a;
else
x = [-b+sqrt(D) -b-sqrt(D)]/2/a;
end
0 Comments
See Also
Categories
Find more on Quadratic Programming and Cone Programming 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!