ana*_*oly 1 matlab phase atan2
我有一个旋转矢量R(x(t), y(t)),我想找到一个角度作为时间的函数.该atan2是之间确定-pi和pi,但它是不方便由我来分析所有动态.那么,有没有什么办法可以扩大atan2从-inf到inf?
你的问题不是很清楚,但我想你正在寻找功能解包.这将校正2 pi当矢量通过负x轴旋转时获得的所有跳跃.你这样使用它:
t = linspace(0,3,1000);
x = cos(2*pi*t);
y = sin(2*pi*t);
phi = atan2(y,x);
unwrapped_phi = unwrap(phi);
plot(t, phi, t, unwrapped_phi)
xlabel('time (s)')
ylabel('angle (rad)')
legend('wrapped angle','unwrapped angle')
Run Code Online (Sandbox Code Playgroud)

| 归档时间: |
|
| 查看次数: |
2009 次 |
| 最近记录: |