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

3 ビュー (過去 30 日間)
NAVYA MOHAN
NAVYA MOHAN 2020 年 9 月 22 日
コメント済み: NAVYA MOHAN 2020 年 9 月 24 日
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 件のコメント
Walter Roberson
Walter Roberson 2020 年 9 月 22 日
Ah, I missed that part of the graph.
NAVYA MOHAN
NAVYA MOHAN 2020 年 9 月 24 日
Its actually circular shift .. i checked the values.. and used the function circshift..
Thank You!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by