MATLAB: For loop with factorial as an increment

factorials as an increment

When you increment a for loop by factorial(n) is matlab updating n within the factorial or is it simply calculating the factorial value and using that as an increment.
ex.
does
factorial(1):factorial(2):factorial(n)
go 1 3 5 7 9 11….n since factorial(2)=2*1
or 1! 3! 5! 7! 9! 11!…..n!
I would test this myself but I do not have software at my disposal.

Best Answer

The moment factorial is evaluated, MATLAB just treats it like a number. Which means it would be your first option.
Related Question