I want to know the number of revolution in each period of time. For example, number of revolutions in period 1 is 3, and number of revolution in period 2 is again 3. But it is not necessarily that the number of revolutions in each period will be the same. See the example please:
I tried to used a for
loop but it works for one period, is there is any way that you can help me please?
x = 0:33;
y1 = repmat([0 1].',17,1);
y2 = [0; 0; 0; 0; 0; 0; 5; 5; 5; 5; 5; 5; 5; 0; 0; 0; 0; 0; 0; 0;...
5; 5; 5; 5; 5; 5; 5; 0; 0; 0; 0; 0; 0; 0];
In other words, how can I know the total number of ones from y1
in each period of y2
when y2==5
?
find(y1(:,:)==1&y2==5)