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 ==> plotVectors must
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 10:43:50
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 ==> plotVectors must
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.
改错!
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 ==> plotVectors must
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)