You can't have an array in MATLAB whose element indices are non-integer values. If M is a matrix M(3.5, pi) will error (for example.)
What are you planning to do with this "matrix" M? You may need/want to create an object that will allow you to interpolate your data, like a scatteredInterpolant or griddedInterpolant.
If you don't want to perform interpolation but want to be able to map non-integer values to a value you could create a matrix like Adam Danz suggested and use ismember or ismembertol with the 'rows' flag when you need to "index" into that matrix with the non-integer values.