How do i check the frequency of an element in a multi level cell array?
Ältere Kommentare anzeigen
The multi level cell array has 61 cells and each of these 61 elements have around 25*30 cells.
7 Kommentare
Sindar
am 20 Jan. 2020
Are the lowest-level cells all the same size?
Dinesh Yadav
am 23 Jan. 2020
Bearbeitet: Dinesh Yadav
am 23 Jan. 2020
Adding upon Sindar's question are datatypes of all elements same or they can be different? Can you share how your data looks like?
Prajwal Venkatesh
am 23 Jan. 2020
Turlough Hughes
am 23 Jan. 2020
Do you want to compare a given string with all strings in results2 or just the given first level cell? What do you want to do with that info?
Prajwal Venkatesh
am 23 Jan. 2020
Turlough Hughes
am 23 Jan. 2020
Is there a reason you need a new array with similar structure to results2? It'd probably be much easier to make a unique list of the strings and list the corresponding frequencies alongside them.
Secondly, it's worth confirming what Dinesh asked with the following code:
test = cellfun(@(x) cellfun(@class,x,'UniformOutput',false),results2,'UniformOutput',false);
unique(vertcat(test{:}))
Or better yet, attach results2, with the paperclip button.
Prajwal Venkatesh
am 23 Jan. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!