I have removed 23 sentences from a text file that are split and are displayed in separate row. The number is given {1,2,3, ...}, the code I used for is as follows:
Sentence = regexp (f, '\ s. *? [\. \! \?], 'Match') Four (sentences)
Now I did some processing and the filtered answer shows the subsets of the sentence given below:
Par G = 1 4 5 9 11 14 16 17
The code I used for the result is as follows:
result = unique ([occasions:]] ); Performance (results)
Now what I want to do is to show sentences, which are not present in the result variable, for example I need the result:
result2 = 2 3 6 7 8 10 12 13 15 18 19 20 21 22 23
Remember the sentence is [1 * N] cell resulting in simple array saving integer
The function you are looking for is:
% // Create an array of indices of all sentences AllSentences = 1:23; Results of the% // index of sentences = [1 4 5 9 11 14 16 17]% // and currently does not exist Current = SetDF (all centes, result) Notificen = column 1 to 13 2 3 6 7 8 10 12 13 15 18 19 20 21 Columns 14 to 15 22 23
I do not understand what the cell array is and what's not, but for cell array, you can call them the cell2 mat
and apply the same method.
Example:
AllSentences = {1:23}; Neuter = setdiff (cell2 matte (alestents), result)
No comments:
Post a Comment