rand gives you number(s) between 0 and 1, so with appropriate scaling and offsetting, you can use it to get number(s) from any given range:
data = 0.3 + 0.1*rand(1,100) % 100 numbers between 0.3 and 0.4
plot(data)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!