Right click at the upper left right corner and chose extended editor. Now you can add files to your post. You are not limited to Mathcad worksheets
.
I've missed your question about the two vectors. If you need to change values in both vectors I would keep them (or bring them via augment) in a nx2 matrix which then would be the output of the function.
As I understand your second vector does not change, so your function has two input argument - the second vector as condition, the first providing the values - and one result - the changed vecor, which you may assign to a new varible or back to the first again. See examples for inverting and ignoring the unwanted values. In the first values over 2.5 are inverted, in the second only values <= 2.5 were put in the result vector.

Of course you could do it without a function as in your first post but I usually try to keep things nice and tidy and as selfcontained as possible. Somewhat shorter but not that versatile and the names of the vectors A, B cannot be changed unless you change the proram, too.
