Is it possible to determine the angle of rotation for this graph?
3 ビュー (過去 30 日間)
古いコメントを表示
I have a graph with two curves which depicts the rotated version of the each other. How can I determine the curve is shifted from one another? Atleast is there a technique to find by how much bins its the curves are rotated?
4 件のコメント
Walter Roberson
2020 年 9 月 22 日
The plots you show are not just a circular shift of each other. The magnitudes are clearly quite different.
採用された回答
Bjorn Gustavsson
2020 年 9 月 22 日
If you have your signals in y1 and y2 you can try to use circshift with an incremental shift until you see a reasonable fit. You can just do it in a simlpe loop:
for i1 = 1:numel(y1)
plot([y1;circshift(y2,i1-1)])
title(i1)
disp('push any key to continue')
pause
end
HTH
0 件のコメント
その他の回答 (1 件)
Walter Roberson
2020 年 9 月 22 日
If one really was a circshift of the other, then by taking one and repeating it once, you can be sure that it would have a substring that was exactly the other one, and the offset to that substring would be the shift value. You would be able to use strfind() to locate the copy.
But there is no way that the example plots are simple circular shifts of each other.
3 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!