Help with a function in a loop
Show older comments
For example:
sampledata:
hello world
hello
hello world world
for i=1:size(sampleData,1)
[x y]=ngramsFreq(sampleData{i},n)
end
% ngramsFreq is a function that returns the frequence and sequences of n letters
I want to caculate x and y for each sentence and store it that after the loop ends and get the specific data for each sentence, how could I do it? I thought bulding a matrix but the size of x and y for each sentence is not equal.
could you help me? Thank's!
Accepted Answer
More Answers (1)
Categories
Find more on Data Type Conversion 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!