MATLAB: Array

i want to list down data r=0.1:0.5. but, im not getting the answer. briefly, i need to create an array with data that starts from 0.1 and ends with 0.5. but, using the code (r=0.1:0,5), im not getting a desired answer rather than 0.1 all the time. thomas anthony's explanation clarifies me what does this code actually do. now, i understand how to define it correctly to get a desired answer.

Best Answer

What do you want r to be? Perhaps you are looking for:
r = linspace(0.1, 0.5, 10)
See:
help linspace