MATLAB: Generate random numbers in the second decimal point

colon operatorrandomrandom number generator

Hi all,
I have an array of numbers (generated using the colon operator):
x=1.198:0.1:2.198
This gives me:
x = 1.198 1.298 1.398 1.498 1.598 1.698 1.798 1.898 1.998 2.098 2.198
I would however like to have a random number between 0 and 5 (including 0 and 5) in the place of 9 which is repeating in the second decimal place for all the above numbers.
Is there any way to do it?
Thanks

Best Answer

x=1.198:0.1:2.198;
x=x-(randi(6,size(x))+3)/100;