Quadratic Equation using Simulink
이전 댓글 표시
Hi, Im new to Simulink, and I was wondering how I would model the quadratic equation
ax^2+bx+c=0
채택된 답변
추가 답변 (3개)
Walter Roberson
2019년 5월 3일
1 개 추천
I would suggest sending the three parameters, a, b, c, to a series of Math Function Blocks, with a signal fork with one fork using + on the sqrt() and the other fork using - on the sqrt(). Be sure to mark the square root as expected to return complex unless you can be certain that b^2 >= 4*a*c
Sulaymon Eshkabilov
2019년 5월 4일
0 개 추천
In this case, the solver has to be a Fixed Step and no problems will happen.
Sulaymon Eshkabilov
2019년 5월 5일
0 개 추천
zeros(2,1) will not make any effect on the solver selection and thus, the solver has to be a fixed step. Otherwise, the model does work.
카테고리
도움말 센터 및 File Exchange에서 General Applications에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!