The following code compiles and runs fine in '188.8.131.526025 (R2019b) Update 1'
function approx = test3(x,N)
approx = zeros(N,1);
approx(1) = x + 1;
for i = 2:N
approx(i) = approx(i - 1) + x^i / factorial(i);
However, when I try and run it in my 2017 Uni environment, I get the following error:
Output argument "output" (and maybe others) not assigned
during call to "factorial".
Error in test3 (line 5)
approx(i) = approx(i - 1) + (x^i) / factorial(i);
Any ideas please?