unique set from file
Show older comments
I have a .mat file with 14994x31 cells with random alphabets in the cells. I need to find the unique set. I know it is going to be the set of all alphabets only. But I want to find exactly which alphabets are present (if not all). Is the anyway to find out the unique set for the entire file and not just row by row?
2 Comments
Adam Danz
on 29 Jul 2019
Could you give us an example of the cell array?
Sanjana Sankar
on 29 Jul 2019
Accepted Answer
More Answers (1)
Joel Handy
on 29 Jul 2019
Edited: Joel Handy
on 29 Jul 2019
c = {'!' 'a:' 'l' 't' '@' [] []
'?' 'a:' 'l' 't' '@' 's' 't'
'/' 'a' 'b' 'a' 'n' 'd' 'A~'};
for rowIdx = 1:size(c,1)
cString(rowIdx) = string([c{rowIdx,:}])
end
uniqueSets = unique(cString)
1 Comment
Sanjana Sankar
on 29 Jul 2019
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!