Is it possible to determine the angle of rotation for this graph?

3 visualizaciones (últimos 30 días)
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 comentarios
NAVYA MOHAN
NAVYA MOHAN el 22 de Sept. de 2020
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 el 22 de Sept. de 2020
The plots you show are not just a circular shift of each other. The magnitudes are clearly quite different.

Iniciar sesión para comentar.

Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 22 de Sept. de 2020
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

Más respuestas (1)

Walter Roberson
Walter Roberson el 22 de Sept. de 2020
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 comentarios
Walter Roberson
Walter Roberson el 22 de Sept. de 2020
Ah, I missed that part of the graph.
NAVYA MOHAN
NAVYA MOHAN el 24 de Sept. de 2020
Its actually circular shift .. i checked the values.. and used the function circshift..
Thank You!

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by