1. A method for analyzing movements of a handheld electronic device, comprising: calculating a matching score for a rotational string representation of rotational movement data for the device to a gesture string representing a gesture related to a command for the device by recursively traversing a matrix containing the rotational string representation, the gesture string representation and earlier movement data of the device using a distance edit algorithm to generate matching scores for values of the rotational string representation against the gesture string; and if a threshold for the matching score is met, executing a command associated with the gesture on the device.
7. The method for analyzing movements of a handheld electronic device as claimed in claim 1 , wherein the rotational string representation and the earlier movement data are used in calculating the matching score to determine if the gesture string straddles the rotational string representation and the earlier movement data.