answer to a quadratic function
이전 댓글 표시
Hi
how do I get both of my solution in a quadratic function? I only have the answer for x1
답변 (1개)
Matt J
2020년 9월 30일
For example,
>> roots([1,5,2]) %roots of x^2+5*x+2
ans =
-4.5616
-0.4384
댓글 수: 2
Agatha E. Johnson
2020년 9월 30일
Matt J
2020년 9월 30일
In all likelihood, that is because you did not call the function with 2 output arguments.
K>> [x1,x2]=myquadratic()
x1 =
3
x2 =
-4
카테고리
도움말 센터 및 File Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!