Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I have a vector [A], which can have any number of even rows and will contain only zeros or ones in each element. I would then like to create another vector [B], which will always have one more than half the number of rows in [A]. The top row element of [B] is always 1, and the following elements depend on the corresponding pairs of elements in [A], working from top to bottom. The element of [B] should be zero only if both the corresponding two elements of [A] are zero, otherwise it should be one. Something like this for a 4 row [A] and 3 row [B]:
And for a 6 row [A] and 4 row [B]:
Hopefully someone can help me out!
Thanks.
Solved! Go to Solution.
Here's a possible implementation of your function:
Result(s):
If you cannot read the attached file, you must state which version of Prime you are using.
Success!
Luc
Here's a possible implementation of your function:
Result(s):
If you cannot read the attached file, you must state which version of Prime you are using.
Success!
Luc
Thanks Luc, that's great!