Is it possible to determine the angle of rotation for this graph?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
NAVYA MOHAN
el 22 de Sept. de 2020
Comentada: NAVYA MOHAN
el 24 de Sept. de 2020
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
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.
Respuesta aceptada
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
0 comentarios
Más respuestas (1)
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
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!