MATLAB: ‘Undefined function ‘atan2’ for input arguments of type ‘sym’.’에러가 뜬는데 어떻게 해결해야되나요

바터워즈 함수의 위상을 2~5차까지 구하기 위해서 다음과 같은 함수를 작성하였습니다.
syms w
clc;clear;
syms w
for m = 2:1:5
for n = 1:1:m
a(n)=(-1*sin(((2*n-1)*pi)/(2*m))+i*cos(((2*n-1)*pi)/(2*m)));
if n==1
F=1/(i*w-a(n));
else
F=F*1/(i*w-a(n));
end
end
ezplot(angle(F),[0,2.5])
hold on
grid on
end
그리고 결과는
Undefined function 'atan2' for input arguments of type 'sym'.
Error in angle (line 14)
p = atan2(imag(h), real(h));
Error in Untitled4 (line 13)
ezplot(angle(F)* 180/sym('PI'),[0,2.5])
다음과 같이 떳습니다. 어떻게 하면 위 문제를 해결할 수 있나요? 도와주시면 감사하겠습니다.

Best Answer

The ANGLE and ATAN2 methods for symbolic objects were introduced in release R2013a according to the Release Notes. Are you using an earlier release?
Related Question