Hello, I'm trying to have decimals in the for loop, I've used this way to do it but it showed me Index exceeds array bound. Is there any other way to have decimals in for loop too?
In this, magnew is 900 values from 3.1 to 7.9.
zz=1:0.1:10;for z=1:91a(z)=length(find(magnew>=(zz(z)) & magnew<(zz(z+1))))/(length(magnew));end
Best Answer