Solved
StuartBruffAnswer
23-Emerald V
January 28, 2022
Here are some variants on the answers already given plus an additional one that allows you to choose whichever elements you want from A.
Note that the functions were written in Mathcad Prime Express 7. Express does not have programming and so breaks a function down into a sequence of successive (functional) steps.



Mathcad Prime Express 7 worksheet attached.
Stuart


