Routh Hurwitz - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Routh Hurwitz (/thread-5849.html) |
Routh Hurwitz - KennyDang - 03-10-2016 05:00 AM Does anyone have a program that can do Routh Hurwitz matrix? RE: Routh Hurwitz - toshk - 03-10-2016 09:37 PM http://www.hpmuseum.org/forum/thread-5528.html RE: Routh Hurwitz - Han - 03-11-2016 03:37 AM Let \( p(z) = a_0 z^n + a_1 z^{n-1} + \dotsm + a_{n-1} z + a_n \) then using HM({ \( a_0, a_1, \dotsm, a_{n-1}, a_n \) }) would produce \[ \begin{pmatrix} a_1 & a_3 & a_5 & \dots & \dots & \dots & 0 & 0 & 0 \\ a_0 & a_2 & a_4 & & & & \vdots & \vdots & \vdots \\ 0 & a_1 & a_3 & & & & \vdots & \vdots & \vdots \\ \vdots & a_0 & a_2 & \ddots & & & 0 & \vdots & \vdots \\ \vdots & 0 & a_1 & & \ddots & & a_n & \vdots & \vdots \\ \vdots & \vdots & a_0 & & & \ddots & a_{n-1} & 0 & \vdots \\ \vdots & \vdots & 0 & & & & a_{n-2} & a_n & \vdots \\ \vdots & \vdots & \vdots & & & & a_{n-3} & a_{n-1} & 0 \\ 0 & 0 & 0 & \dots & \dots & \dots & a_{n-4} & a_{n-2} & a_n \end{pmatrix} \] The source code for the HM() program: Code: // Compute Hurwitz matrix of p(z) RE: Routh Hurwitz - Han - 03-11-2016 04:03 AM And here's a CAS version of the program above, with an extra modification that allows one to compute either the Hurwitz matrix, or the submatrix corresponding to the minors. Usage: hurwitz({a0,a1,a2,...,an}, s) where s is the size of the submatrix (leading principal minor). If \( s=n \), then the entire matrix is produced. Otherwise, \( s \)-th minor is returned. Code: #cas RE: Routh Hurwitz - Brad Barton - 03-11-2016 08:09 PM Thanks for posting both solutions Han. This is very instructive. Brad |