http://www.tti.unipa.it/~stm/singular_rank.m