Reputation: 7339
How do I do this? If I were checking for 1's I'd look at the length of the sum, but not sure how to check if all elements are equal to -infinity without looping.
Upvotes: 0
Views: 63
Reputation: 244182
Use all doc
all
v = [-inf, -inf, -inf, -inf] all(v==-inf) 1 v = [-inf, -inf, 1] all(v==-inf) 0
Upvotes: 2