MATLAB第三幅图总是出现? Error using ==> stem The length of X must match the number of rows of Y求解答!n=0:31;f=1/16;xn=2*sin(2*pi*0.125*n)+3*cos(2*pi*(0.125+f)*n);xn_1=[xn,zeros(1,96)];XN=fft(xn);XN_1=fft(xn_1);w=n*2*pi/length(n);figure;su

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/26 03:02:47
MATLAB第三幅图总是出现? Error using ==> stem The length of X must match the number of rows of Y求解答!n=0:31;f=1/16;xn=2*sin(2*pi*0.125*n)+3*cos(2*pi*(0.125+f)*n);xn_1=[xn,zeros(1,96)];XN=fft(xn);XN_1=fft(xn_1);w=n*2*pi/length(n);figure;su

MATLAB第三幅图总是出现? Error using ==> stem The length of X must match the number of rows of Y求解答!n=0:31;f=1/16;xn=2*sin(2*pi*0.125*n)+3*cos(2*pi*(0.125+f)*n);xn_1=[xn,zeros(1,96)];XN=fft(xn);XN_1=fft(xn_1);w=n*2*pi/length(n);figure;su
MATLAB第三幅图总是出现? Error using ==> stem The length of X must match the number of rows of Y
求解答!
n=0:31;
f=1/16;
xn=2*sin(2*pi*0.125*n)+3*cos(2*pi*(0.125+f)*n);
xn_1=[xn,zeros(1,96)];
XN=fft(xn);
XN_1=fft(xn_1);
w=n*2*pi/length(n);
figure;
subplot(1,3,1);
stem(xn,'.');
subplot(1,3,2);
stem(w,abs(XN),'.');
subplot(1,3,3);
stem(w_1,abs(XN_1),'.');

MATLAB第三幅图总是出现? Error using ==> stem The length of X must match the number of rows of Y求解答!n=0:31;f=1/16;xn=2*sin(2*pi*0.125*n)+3*cos(2*pi*(0.125+f)*n);xn_1=[xn,zeros(1,96)];XN=fft(xn);XN_1=fft(xn_1);w=n*2*pi/length(n);figure;su
这个意思是X长度跟Y的行数不统一