Unwrap function not operating correctly
显示 更早的评论
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

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?

4 个评论
Guillaume
2019-9-26
What's the difference between the A used in the splitapply and the B you're talking about (not used in the splitapply).
Example data would be useful.
Nikolaos Zafirakis
2019-9-26
Nikolaos Zafirakis
2019-9-27
编辑:Nikolaos Zafirakis
2019-9-27
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
