Prev: winqueryreg
Next: convert video as .wmv to . avi format
From: Jan Simon on 22 Feb 2010 09:56 Dear Jack! > Does anybody know of a function that enables me to lexicographically order the numeric entries of each row of an array? While SORT sorts the single columns independently, and can be applied recursively (as Rune said), you can call SORTROWS to sort the columns considering the previous ones. Kind regards, Jan
From: Jack Branning on 22 Feb 2010 10:12 > While SORT sorts the single columns independently, and can be applied recursively (as Rune said), you can call SORTROWS to sort the columns considering the previous ones. > > Kind regards, Jan Thanks for your response. To clarify, are you recommending "sortrows" instead of "sort" to comply with the paper? I guess my problem lies with not knowing what is meant by "integer tuples" in this context. "To identify the identical rows, the rows of the matrix A are lexicographically ordered (as B×B integer tuples). This can be done in MNlog2(MN) steps."
From: Jan Simon on 22 Feb 2010 10:19 Dear Jack! > "To identify the identical rows, the rows of the matrix A are lexicographically ordered (as B×B integer tuples). This can be done in MNlog2(MN) steps. The matching rows are easily searched by going through all MN rows of the ordered matrix A and looking for two consecutive rows that are identical." > > where BxB represents a 3x3 sliding window... > > I can't seem to find a good definition of lexicographical ordering that can be applied to this context. Does anyone have any ideas? SORTROWS is fine to identify matching rows. But you can call UNIQUE(A, 'rows') also, which might be easier. BTW: I do not understand "ordered as BxB integer tupels" and why BxB is a 3x3 sliding window. Kind regards, Jan
From: Jack Branning on 22 Feb 2010 10:53 > SORTROWS is fine to identify matching rows. > But you can call UNIQUE(A, 'rows') also, which might be easier. > > BTW: I do not understand "ordered as BxB integer tupels" and why BxB is a 3x3 sliding window. > > Kind regards, Jan I've done some more research, and as far as I can tell, lexicographical ordering (when applied to integers) would convert: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 to 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9 Here, all numbers starting with a 1 are at the beginning of the list. Although, logically 12 does not seem smaller than 2, lexicographic ordering works not on the value of the integer in hand, but on the digits that make it up. Also, 10 cannot be smaller than 1 in the ordered list because it is shorter in length (just as the word "forge" would come before the word "forgery" in an English dictionary). Does anyone know if MATLAB has a built-in function for this type of ordering?
From: Jan Simon on 22 Feb 2010 12:22 Dear Jack! > I've done some more research, and as far as I can tell, lexicographical ordering (when applied to integers) would convert: > > 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 > to > 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9 It would be helpful, if you try to obtain such important information *before* you ask questions and let the NG members spend time for replies. T = [1, 5, 6, 7, 8, 9, 10, 11, 12, 2, 3, 4] x = [2, 10, 1, 12, 4, 7] xT = T(x); [dum, SortInd] = sort(xT); xLex = x(SortInd) But I still have the impression it could be done easier. Jan
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: winqueryreg Next: convert video as .wmv to . avi format |