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 个评论
NAVYA MOHAN
NAVYA MOHAN 2020-9-22
They are not having phase shift .. i tried using fft and xcorr yielding zero phase shift.
They are exact copies but rotated by some angle.. ie values are rotated randomly starting at any position but they maintain the order (like this shown)
x= [1 2 3 4 5 6 7 8 9 10]
y = [5 6 7 8 9 10 1 2 3 4]
I would like to know how much it is rotated? is there any technique with which can find the rotation with respect to a ref point?
Walter Roberson
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
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

更多回答(1 个)

Walter Roberson
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 个评论
NAVYA MOHAN
NAVYA MOHAN 2020-9-24
Its actually circular shift .. i checked the values.. and used the function circshift..
Thank You!

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by