% Vectorization is much more efficient and thus, it is better to use it here:
n=100; tau =0.2; t = (n-1)*tau:tau/n:n*tau;
Useries = 1+ (t(1:end-1)-((1:n) -1)*tau).^(1:n)./factorial(1:n);
plot(t(1:end-1), Useries, 'b-o'), grid on, shg
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!