Get the value of property from bagOfWords
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Phil_911
le 15 Juil 2020
Commenté : Walter Roberson
le 15 Juil 2020
Hi,
I have got following bagOfWords and need to extract the number of words into an arrary. How is that possible?
bagOfWords with properties:
Counts: [1×68 double]
Vocabulary: [1×68 string]
NumWords: 68
NumDocuments: 1
Thanks in advance
3 commentaires
Réponse acceptée
Walter Roberson
le 15 Juil 2020
bag.NumWords
2 commentaires
Walter Roberson
le 15 Juil 2020
data = cat(1, image_patches,labels);
That code is overwriting all of data each iteration.
It looks to me as if data will not be a vector, but I do not seem to be able to locate any hellopatches() function so I cannot tell what shape it will be. As you are not doing imresize() I also cannot be sure that all of the images are the same size, so I cannot be sure that data will be the same size for each iteration. Under the circumstances you should be considering saving into a cell array.
Note: please do not post the same query multiple times. I found at least 3 copies of your query :(
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!