With that in mind, one can sort your input sequence in order to get the order it was in with the second output of MATLAB's sort function. NOTE : Characters are ordered alphabetically due to the way ASCII code is defined (see for example the outputs of 'A''Z') 'ABCD').Ä¢) Apply a permutation to your matrix so that it satisfies your condition. I would do the following, even if it doesn't seem really optimized :Ä¡) Fill your output matrix as if the order was the natural one (i.e. How to create that kind of above matrices from a given cell-array of sequences? % If we have S3 = 'BCAD' (which means B< M(j,i) For example if A< M(B,A) I want to convert each of the strings in the Input_cell into a matrix M (i-by-j) which has to satisfy these conditions: M(i,j) and M(j,i) are random I have 3 sequences in a cell-array: Input_cell= One of the previous questions is in different length, another case just transform from one string into a matrix The difference in this case from the previous cases is the length of each string the the Input-cell is the same.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |