unwrap funtion is not work.
Show older comments
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)
Walter Roberson
on 4 Nov 2015
Try
ezplot( matlabFunction(unwrap(angle(F)*180/pi)), [0,3])
2 Comments
paul
on 4 Nov 2015
Edited: Walter Roberson
on 8 Nov 2015
Walter Roberson
on 8 Nov 2015
F1 = matlabFunction(F, w);
F2 = @(w) unwrap(angle(F1(w))*180/pi);
ezplot(F2, [0,3])
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!