Many thanks for the input, John!
To clarify, the function is not my code. It is a peer-reviewed one from someone else.
Were you inferring that the Mathworks Q&A section is for bug reporting related issues only? I totally understand if you do not want to help because my question will involve someone to provide some code. However, belive it or not, that's what 90% of the questions are about here. Therefore, I would appreciae it if you do not close my ticket because of that. I hope you have a good weekend.