MATLAB: Similar to unique, how can i use for case insenisitive

similar as that of unique function

For example I have cell array a = { 'abc' , 'aBc' , 'xyz' , 'Xyz'}
now i need to remove the duplication.
As unique is the case sensitive, it returns the whole array.
how can i do it?
Thank you

Best Answer

a = { 'abc' , 'aBc' , 'xyz' , 'Xyz'};
[dummy, ia] = unique(lower(a));
result = a(ia);