answer to a quadratic function
Ältere Kommentare anzeigen
Hi
how do I get both of my solution in a quadratic function? I only have the answer for x1
Antworten (1)
Matt J
am 30 Sep. 2020
For example,
>> roots([1,5,2]) %roots of x^2+5*x+2
ans =
-4.5616
-0.4384
2 Kommentare
Agatha E. Johnson
am 30 Sep. 2020
Matt J
am 30 Sep. 2020
In all likelihood, that is because you did not call the function with 2 output arguments.
K>> [x1,x2]=myquadratic()
x1 =
3
x2 =
-4
Kategorien
Mehr zu Quadratic Programming and Cone Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!