问题描述:
MATLAB画周期矩形频谱
N=8;
>> n1=-N:-1;
>> n2=1:N;;
>> a=2;b=1;c=1;
>> c1=(a*b/(2*pi))*sin(n1*b*c)/(n1*b*c);
>> c2=a*b/(2*pi)*sin(n2*b*c)/(n2*b*c);
>> c0=a*b/(2*pi);
>> cn=[c1 c0 c2];
>> n=-N:N;
>> plot(n,cn)
运行出现?Error using ==> plot
Vectors must be the same lengths.
改错!
N=8;
>> n1=-N:-1;
>> n2=1:N;;
>> a=2;b=1;c=1;
>> c1=(a*b/(2*pi))*sin(n1*b*c)/(n1*b*c);
>> c2=a*b/(2*pi)*sin(n2*b*c)/(n2*b*c);
>> c0=a*b/(2*pi);
>> cn=[c1 c0 c2];
>> n=-N:N;
>> plot(n,cn)
运行出现?Error using ==> plot
Vectors must be the same lengths.
改错!
问题解答:
我来补答展开全文阅读