Hello,
I am trying to count a group of zeros with a for loop.
But it keeps giving me the error Index must be a positive integer or logical.
Stops=0;for i=1:size(TachographVehicleSpeed)if (TachographvehicleSpeed(i)==0&&TachographvehicleSpeed(i-1)~=0)Stops = Stops + 1;endend
Best Answer