Unwrap function not operating correctly
조회 수: 5 (최근 30일)
이전 댓글 표시
B = (:,1:3);
C = (:,4); % Group packets restart at 0 and finish at a specific number
group = cumsum(C == 0) + double(C(1) ~= 0); % Splits the groups further
% into ones then twos then therees etc...
% [1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 4 4 4]'
Bb = splitapply(@(m) {(unwrap(m/2^15*pi)*2^15/pi)}, B, group); % Splits the groups up and performs the
% caculation unwrap(m/2^15*pi)*2^15/pi
Original output input at B
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239979/image.jpeg)
The result of the algorithm can be seen below. Unfortunately, it is not operating correctly as it has a drift in the y-direction. Can anyone provide any insight into how to correct this code?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239980/image.jpeg)
댓글 수: 4
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!