if any a can be index?
2 次查看(过去 30 天)
显示 更早的评论
A(n)=1;
采纳的回答
Image Analyst
2017-12-5
Perhaps this:
VV=8;
v=length(y);
n=0;
for k=1:VV:length(y)
n = n + 1;
if any(y(k:k+8))
A(n)=1;
else
A(n)=0;
end
end
By the way, are you sure you don't want k:(k+7) instead of k:k+8?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!