Problem passing variables to a function
Hello,
I'm using MathCad Prime 2.0 and am pretty new to the software but am having trouble passing variables as arguments to functions.
I am trying to use a For loop within my function and don't think I am doing anything wrong in terms of syntax because even if I just copy the For loop example in the tutorial I don't get the answer shown in the tutorial. I have attached a screenshot of the problem but it's also typed below if that helps.

In other words, the result I get is as though the 'vec' array has not be read. The answer I would expect would be a column vector containing 4 items, all zeros except the fourth, which would be a 7. Has anyone else had this problem? I can't work out what I'm doing wrong.
On a similar example the variables I am trying to assign as arguments to a function result in the error message 'The variable is undefined. Check that the label is set correctly'. I'm pretty sure that this is because the arguments are not passing to the function rather than a labelling problem.
Any help would be hugely appreciated!
Thanks!

