You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out circ_median handle one situation wrong. say, beta=[1 2 2 4 4 6], according to the code of circ_median below, dm = [5 2 2 2 2 5], m = 2, idx = [2 3], md = 2. But md should be the mean of 2 and 4, i.e., 3. Therefore, it seems circ-median handle this case wrong.
To correct it, I suggest change the last part into,
else
m = min(dm);
idx = find(dm==m);%endifm>1 && length(unique(beta(idx)))~=2
warning('')% same as above
md = circ_mean(beta(idx))
In the original circ_median, assuming beta = 0:pi/3:2pi, then each phase should be the median. However, from m = min(dm); idx = find(dm==m,2), it seems it only includes the first two phases, rather than take them all. I simply suggest change it into idx = find(dm==m).
The text was updated successfully, but these errors were encountered:
Thanks for the code.
To correct it, I suggest change the last part into,
m = min(dm); idx = find(dm==m,2)
, it seems it only includes the first two phases, rather than take them all. I simply suggest change it intoidx = find(dm==m)
.The text was updated successfully, but these errors were encountered: