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!