Where I making mistake in the following code using matlab? : I have written a code :

    for i = 1:length(Speed)
    new=find(Speed>edges,1,'last'); 
    N(new)=N(new)+1; end

Speed = 3000x1 ; edge = 50x1; N =50x1.  After running this code I am getting the following code 'Error using  > Matrix dimensions must agree'

I want to store the value in 'new' whenever Speed >edges. but I am getting this error.
