Sum if conditions are satisfied across arrays
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
Kinda stuck. Scenario is:
I have a binary 2D array that is n rows and m columns.
I want to count how many times an element went from being a '1' in one row, to a '0' in the next row, and store it as a vector.
I have updated an illustration to help.
Would really appreciate an efficient and simple solution, cheers.
2 个评论
Matt J
2018-2-14
I have a binary 2D array that is m rows and n columns.
According to your diagram, n is the number of rows, not columns.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!