フィルターのクリア

if any a can be index?

2 ビュー (過去 30 日間)
Da'Moon
Da'Moon 2017 年 12 月 5 日
編集済み: Da'Moon 2017 年 12 月 5 日
  1 件のコメント
KSSV
KSSV 2017 年 12 月 5 日
What is y?

サインインしてコメントする。

採用された回答

Image Analyst
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?
  2 件のコメント
Da'Moon
Da'Moon 2017 年 12 月 5 日
you are correct!
Da'Moon
Da'Moon 2017 年 12 月 5 日
thank you it seems its working now!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by