check the row that has at least one non zero element, except one row
2 次查看(过去 30 天)
显示 更早的评论
I have a matrix that has 20 rows and I have to calculate some thing only on the rows that have at least one element, except one row that is specified by a variable, I use this:
for i = setdiff(1:r, row)
for the specific row exception part, but how can i mix this with, for example, any(matrix,2)?
2 个评论
Bob Thompson
2018-2-12
I'm a little confused what you're asking. Are you looking for how to code the check for non-zero elements in each row?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!