I need to work with Matlab again but it's long ago that I did so the last time. So I need your help (searching for "set" leads only to how to set colors of axis and so...). How can I achieve a set like behavior of an array (or any other similar datatype).
The thing is I have a initial set of vectors and want to add some new vectors to it but I don't want doubles.
Thank you in advance.
Let
Abe the $k\times n$ matrix containing your first vectors andvbe the $1\times n$ vector you want to add in your "set"A. ThenB = unique([A;v],'rows')will either output youB = Aifvalready belongs toAorB = [A;v]ifvis a new vector of the set of vectorsA.