フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to increase filter length until required number of solutions is reached

1 回表示 (過去 30 日間)
Afzal
Afzal 2013 年 3 月 26 日
I need to run a filter while increasing its length until the required number of solutions is reached. How should I define the variable 'index' to make the following 'while loop' function.
while length(index)>8
n = 20;
filtered_ipam_relative_hand_position = moving_average_filter(ipam_relative_hand_position, n);
velocity=zeros(size(filtered_ipam_relative_hand_position));
for i = 1:length(data)
for j = 1:3
x = i-1;
y = i+1;
if x == 0
x = 1;
else
if i == length(data)
y = length(data);
end
end
velocity(i,j) = (filtered_ipam_relative_hand_position(y,j)- filtered_ipam_relative_hand_position(x,j))/0.08;
end
end
magnitude_velocity = zeros(length(velocity),1);
for i=1:length(data)
magnitude_velocity(i)=((velocity(i,1))^2 + (velocity(i,2))^2 + (velocity(i,3))^2)^0.5;
end
for i=1:length(data)-1
if (magnitude_velocity(i+1,1)<0.01) && (magnitude_velocity(i,1)>0.01)
index = [index i];
end
end
n = n+1;
end
  2 件のコメント
Afzal
Afzal 2013 年 3 月 26 日
Its the same question but I don't know how to define the variable 'index'.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by