matlab - How to unique elements of each cell vector? -


Suppose I have ten cell vectors, c {1}, c {2}, ..., C {10} , if I want to remove the unique elements of each vector vector at the same time, how can I do this? I tried to use the unique (c) , but it does not work.

If you want unique elements of each cell, then you have to apply unique to each code, such as unique (c {1}) , unique (c {2}) etc. This the cellphone .

  can be achieved by using uniqueCellArray = cellfun (@ unique, yourCellArray, 'UniformOutput', incorrect);  

If you have a matrix in your cell array, then you want to use the option 'rows' if you are outside of unique If you do not want to sort, you may want to use the option 'Stable' . You can modify the details given below:

  uniqueTestCell = selphon (@ (x) (unique (x, 'rows', 'static')), testicle, 'uniformaptive' wrong) ;  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -