File Exchange

image thumbnail

Routh-Hurwitz stability criterion

version (1.33 KB) by Farzad Sagharchi
Hurwitz criterion basically tells us how many poles are located in the Left-Hand Plane, Right-Hand P


Updated 11 Nov 2016

View Version History

View License

Routh-Hurwitz stability criterion identifies the conditions when the poles of a polynomial cross into the right
hand half plane and hence would be considered as unstable in control engineering.

Cite As

Farzad Sagharchi (2021). Routh-Hurwitz stability criterion (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (71)


@Michael Shaughnessy Your statement is not always true, e.g. [1 0 1], roots are +-j which means the system is marginally stable.

Michael Shaughnessy

There is no need to use it with [1 0 4 0 0 3 0 2] You have missing coefficients so you can automatically conclude the system is unstable.


Ayush Jain

A slight error is there while placing condition for checking special purpose.


Mehdi Khorasani

Luis Lopez


Roden Jay Rabe

Cons: It cannot generate such special cases.

Akshit Chatur

Esteban Jacob Taquet

It doesn't work well with [1 0 4 0 0 3 0 2]. I'm not able to do it by hand either ...

Mohammad Mazi

عالی . سپاس فراوان

mustafa alobaidi


Pranabendra Chandra


Just Great


I want to solve routh stability with an unknown K. How can ı do that ?

Ali Akbari

Wonderfully useful!
Is there a way we could do this symbolically? Like for a parametrized system.

Justin Silvers

Awesome!!! Thank you so much for this :)

Nivaldo Neto

Arun Dixit

Andre Lemos

Chihang Yang

It's helpful!

Hakan Gürsoy

Vuk Gru

Works like a charm. Saved me lots of time. Thanks!!!!

Kishor Sabarish G

Theo Leasca




How to use it when you need use hurwitz criterion

Isaac McCullough

nayif alrashdi

Anthony Saleh

Awesome, Thank you

Reza Sugiarto




Farzad Sagharchi



thanks a lot


Thank you very much sir!

Ki Ho Seong

thx a lot!!!

Syafiq Firdaus

Great work, btw I would love to know determining Acceptable Gain Values,K? How to change/add the coding?

sarah kelton

André Chamgoué

Thanks a lot

Adeta Ahmadani

Farzad Sagharchi

@Leonard Tserrikou

Leonard Tserrikou

Thanks a lot . It works perfect

Hung Nguyen

Thank you

vahid AliMohammadi

واقعاً عالی بود داداش ممنون :-)


amirreza sojoodi

داداش دمت گرم

amirreza sojoodi

داداش دمت گرم

anan hmdan

Thankx for sharing great job

Fidel Palma

Cool. Thanks for sharing.

lanh tran

good job

Emad Ravari

sinoTrinity Liu

Cannot deal with special case when all elements in a row is 0. Try [1 0 7 0 5 0 2 0].

Luis Zambrano

good job




how can i get the criterion with a variable for example , [1 28 356 1952 5248 1000*kc]??

Jack Lê

thank you very much for sharing.

Np4e odhah

sotty ,the code is working good

Np4e odhah

thanks for the code but it's buggy as mentiond above , try the following vector [1 4 3 12]

The program is buggy and not accurate. Try [1 1 2 24] which is an example of Dorf control text book. Compare your result with this file:
and compare the result.


very good but how I can operate m-file in command windows
please help me in this

Farzad Sagharchi

@ J. Palacio
please explain more ! the result and algorithm both are correct.

@ Azeem A
numbers after precision isn't important , just changing sign of the first column in important.

Azeem A

accurate and works great. only issue is that for larger numbers, it uses scientific notation and as a result some precision is lost.

Kowit Kallatyatong

Dave Meissner


J. Palacio

the Routh Hurwitz table returns by this algorithm is not the correct one and it uses a very big value of epsilon for one of the special cases.

caio guimaraes

Very good. And very simple to use. Good job!

Ehsan Shafaghat

This Is The Best At The First!!!

fernando ribeiro

good job and thank u for sharing

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!