There turned out to be three problelms with your code that I corrected here.
The original one was due to your forgetting an operator, that I assume should be a multiplication:
F = X_temp + (((delta*eta)/(beta*r))*(1-exp(r*(t-T))));
The second is that ‘X_EM’ was not preallocated correctly, and not addressed correctly, since each ‘X_temp’ is a (1x3) vector:
X_EM = zeros(L,3);
for j = 1:L
Winc = sum(dW(R*(j-1)+1:R*j));
X_temp = X_temp + Dt*((pi*(lambda-r)+r)-C) + (mu*pi)*Winc;
X_EM(j,:) = X_temp;
The third was that the dependent variable in the plot call was not concatenated correctly, now that ‘X_EM’ is a matrix:
plot([0:Dt:T],[Xnot*ones(1,3);X_EM],'g-', 'LineWidth', 2)
With these changes, your code works.