How to determine if elements in a column are negative
4 views (last 30 days)
Show older comments
I am developing a program for a class project to determine the states for a petri net. It will use the basic algorithm for a coverability tree. One of the first steps is determining the firability of a transition, and I would need to determine if any of the elements in a column of a matrix is negative. I looked through the function list and didn't see anything that would apply.
Any suggestions for either the column logic or petri net in general would be appreciated.
Thanks
2 Comments
Accepted Answer
Azzi Abdelmalek
on 22 Mar 2013
Edited: Azzi Abdelmalek
on 22 Mar 2013
any(A(:,3)<0) % find if any of column 3 of matrix A is negative
2 Comments
More Answers (1)
See Also
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!