matlab - Good way to get phase difference between vectors? -


so have 2 vectors:

>> [phase exp_phase]  ans =      0.2266         0    -0.0702         0    -0.0070         0    -0.0854         0     0.0888         0     3.1403   -3.1416    -2.9571   -3.1416    -0.1441         0    -0.2660         0     2.8749   -3.1416     0.0126         0    -2.9309   -3.1416     0.0064         0 

phase obtained atan2(b,a). want figure out phase difference. problem want difference between -3.00 , +3.00 0.28, @ same time want difference between -2.72 , +3.00 same.

it's trivial can't figure out way :(

say have 2 angles, w1=+3 , w2=-3 (both in radians). find smallest angular difference, following:

atan2(sin(w1-w2),cos(w1-w2))  ans =     -0.2832 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -