How do i check the frequency of an element in a multi level cell array?
Mostra commenti meno recenti
The multi level cell array has 61 cells and each of these 61 elements have around 25*30 cells.
7 Commenti
Sindar
il 20 Gen 2020
Are the lowest-level cells all the same size?
Dinesh Yadav
il 23 Gen 2020
Modificato: Dinesh Yadav
il 23 Gen 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
il 23 Gen 2020
Turlough Hughes
il 23 Gen 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
il 23 Gen 2020
Turlough Hughes
il 23 Gen 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
il 23 Gen 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!