フィルターのクリア

Array results showing negative values

2 ビュー (過去 30 日間)
Ralph
Ralph 2020 年 8 月 30 日
コメント済み: KSSV 2020 年 8 月 30 日
[row,c]=size(x);
total_frames=row/9;
k=1;
i=5;
aa=rem(row,P+1);
last_index=row-aa;
for i=5:9:last_index %runs for tatal number of samples in signal
g =[x(i-1), x(i-2), x(i-3), x(i-4)];
h =[x(i), x(i+1), x(i+2), x(i+3), x(i+4)];
So I am using this code x(i-1)...x(i-4) to go backward in the array but every time it subtracts and give results in negative. How will I go and select the backward values 1 to 4 before 5, because my loop start from 5.
j = [g,h];
theeta = std(j);
alpha = 0.9;
thresh = theeta * alpha;
end
  1 件のコメント
KSSV
KSSV 2020 年 8 月 30 日
You can use fliplr and use same forward notation.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMeasurements and Spatial Audio についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by