OLD | NEW |
1 function sequence = maxUnwrap(sequence, max) | 1 function sequence = maxUnwrap(sequence, max) |
2 % | 2 % |
3 % sequence = maxUnwrap(sequence, max) | 3 % sequence = maxUnwrap(sequence, max) |
4 % Unwraps when a wrap around is detected. | 4 % Unwraps when a wrap around is detected. |
5 % | 5 % |
6 % Arguments | 6 % Arguments |
7 % | 7 % |
8 % sequence: The vector to unwrap. | 8 % sequence: The vector to unwrap. |
9 % max: The maximum value that the sequence can take, | 9 % max: The maximum value that the sequence can take, |
10 % and after which it will wrap over to 0. | 10 % and after which it will wrap over to 0. |
11 % | 11 % |
12 % Return value | 12 % Return value |
13 % | 13 % |
14 % sequence: The unwrapped vector. | 14 % sequence: The unwrapped vector. |
15 % | 15 % |
16 | 16 |
17 % Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 17 % Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
18 % | 18 % |
19 % Use of this source code is governed by a BSD-style license | 19 % Use of this source code is governed by a BSD-style license |
20 % that can be found in the LICENSE file in the root of the source | 20 % that can be found in the LICENSE file in the root of the source |
21 % tree. An additional intellectual property rights grant can be found | 21 % tree. An additional intellectual property rights grant can be found |
22 % in the file PATENTS. All contributing project authors may | 22 % in the file PATENTS. All contributing project authors may |
23 % be found in the AUTHORS file in the root of the source tree. | 23 % be found in the AUTHORS file in the root of the source tree. |
24 | 24 |
25 sequence = round((unwrap(2 * pi * sequence / max) * max) / (2 * pi)); | 25 sequence = round((unwrap(2 * pi * sequence / max) * max) / (2 * pi)); |
OLD | NEW |