unwrap funtion is not work.

this is code that I used
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(unwrap(angle(F)*180/pi),[0,3])
hold on
grid on
end
but it's not work and i got error.
다음 사용 중 오류가 발생함: sym/diff (line 36) The second and third arguments must either be variables or a variable and a nonnegative integer specifying the number of differentiations.
오류 발생: unwrap>LocalUnwrap (line 85) dp = diff(p,1,1); % Incremental phase variations
오류 발생: unwrap (line 65) q(indf,j) = LocalUnwrap(p(indf,j),cutoff);
오류 발생: Untitled2 (line 13) ezplot(unwrap(angle(F)*180/pi),[0,3])
please help me...

Answers (1)

Try
ezplot( matlabFunction(unwrap(angle(F)*180/pi)), [0,3])

2 Comments

I try, but not work....
다음 사용 중 오류가 발생함: sym/diff (line 36)
The second and third arguments must either be variables or a variable and a nonnegative integer specifying the number of differentiations.
오류 발생: unwrap>LocalUnwrap (line 85)
dp = diff(p,1,1); % Incremental phase variations
오류 발생: unwrap (line 65)
q(indf,j) = LocalUnwrap(p(indf,j),cutoff);
오류 발생: Untitled (line 12)
ezplot( matlabFunction(unwrap(angle(F)*180/pi)), [0,3])
well... please help me again....
F1 = matlabFunction(F, w);
F2 = @(w) unwrap(angle(F1(w))*180/pi);
ezplot(F2, [0,3])

Sign in to comment.

Tags

Asked:

on 4 Nov 2015

Commented:

on 8 Nov 2015

Community Treasure Hunt

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

Start Hunting!