For arrays, use the minus operator. For example:
>> foo = [1, 2, 3] => [1, 2, 3] >> goo = [2, 3, 4] => [2, 3, 4] >> foo - goo => [1]
Here, the last line removes everything from foo, which is also in goo, leaving only element 1. I don’t know how to do this for two lines, but for now, anyone who knows the messages about this, you can just convert each line to an array , use the minus operator, and then convert the result back.
Chris Bunch Sep 17 '08 at 4:53 2008-09-17 04:53
source share