I am getting very strange error in Mathcad Prime Has anyone seen it. If yes how to solve this and where I am doing wrong
Evaluation will go back to the definition. In case of the evaluation of Functions(X,Y) it will go back to
and I guess you can imagine what happens if you call the function with x=0 (one of the values in your vector X) and if beta is greater than alpha (which will be the case with the nested loops you defined) --> division by zero (or as Prime states "a magnitude greater 10^307").
Workaround is a redefinition with a symbolic evaluation:
But there is another fault, too: you have to vectorize the function call, as otherwise expression like x*y will be taken as the vector product of X and Y and give a scalar.
Here is an alternative definition for the vector of functions which does not need a redefinition with symbolic evaluation.
Vectorization is still needed of course.
With some slight modifications we can also use your way to defined that vector without running in the division by zero: