I am having a very strange error. If the built in factorial function is used on an array, for example factorial([1,2]) I receive the error maximum recursion limit of 500 reached. This is running on a mac with 2014 Matlab. Running 2017 on a windows has no problem. I thought maybe factorial wasn't set up to evaluate vectors on earlier versions, but then I ran it on a 2012 version on ubuntu and it evaluates it fine. I've done some googling and haven't found this error related to factorials. Does anybody have any idea what is happening?
To be clear, it is doing it on very small numbers, like my [1,2] example. I could understand the error, I guess, if it was trying to evaluate the factorial of a large number.