This seems to be the result of a gap in MATLAB's symbolic logic. Your assumption
assume(alpha>-pi & alpha<pi)
should be enough to conclude that atan2(sin(alpha),cos(alpha))=alpha. However, for some reason MATLAB seems to be applying the one-argument atan rules (rather than the 2-argument atan2 ones) to this problem, wherein atan(sin(alpha)/cos(alpha))=alpha only if -pi/2<alpha<pi/2. You can check this by replacing the above assumption with
assume(alpha>-pi/2 & alpha<pi/2)
and then
>> simplify(angle(A))
ans =
alpha
as desired.
I'm not sure if this is a bug, or if there's some good reason for it.
0 Comments
Sign in to comment.