This should not work in general. It returns false-positive for consecutive 1 5 7 :-)
Set some matrix elements to zero
293 Solvers
Generate a random matrix A of (1,-1)
214 Solvers
326 Solvers
poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
169 Solvers
556 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!