MATLAB has an index origin of 1, not 0. So X(0) will fail, and give you exactly that error. (Matt pointed that out.)
T = 10;
N = 100;
h = T/N;
X = zeros(1,N+1);
X(h) = X(0) + mu*h + sigma*Z;
What is h? h=10/100 = 0.1.
X is a vector. Can you index a vector at the 0.1 location? Where is that? Sort of between location 0 (which does not even exist in MATLAB anyway) and memory location 1?
Sorry. Start with the getting started tutorials. You need to learn how MATLAB does indexing.