Can you represent the number 1/3 EXACTLY as a decimal (thus base 10) number in a finite number of decimal digits? (Hint: NO)
Numbers in MATLAB (and in many such computational environments) are stored using double precision, using an IEEE standard form. That means they are stored with a 52 bit mantissa, stored as BINARY bits, thus effectively base 2. (If you prefer, 13 hexadecimal digits.)
Now, can you represent the number 1.2 EXACTLY in a finite number of binary bits? (Hint: read my first question again.)
Again, the answer is no. If you did try to represent 1.2 in binary, it would be an infinite repeating binary fraction, just like a repeating decimal approximation to 1/3 or 1/7.
Thus 1 + 1/8 + 1/16 + 1/128 + 1/256 + ...
In fact, that gets us pretty close to 1.2.
1 + 1/8 + 1/16 + 1/128 + 1/256 ans = 1.1992
But not exactly so. And nothing you can do will represent 1.2 exactly in a finite binary form.
So this is not a linspace error. It is an error of understanding the limitations of floating point arithmetic.