MATLAB程序问题源程序:clear all;close all;n=-20*pi:pi/5:20*pi;fn=sin(n/5)/(n/5);stem(n,fn,'fill');error:X must be same length as Y.函数是:f(n)=sin(n/5)/(n/5) (-20

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 12:25:29
MATLAB程序问题源程序:clearall;closeall;n=-20*pi:pi/5:20*pi;fn=sin(n/5)/(n/5);stem(n,fn,''fill'');error:Xmustb

MATLAB程序问题源程序:clear all;close all;n=-20*pi:pi/5:20*pi;fn=sin(n/5)/(n/5);stem(n,fn,'fill');error:X must be same length as Y.函数是:f(n)=sin(n/5)/(n/5) (-20
MATLAB程序问题
源程序:
clear all;
close all;
n=-20*pi:pi/5:20*pi;
fn=sin(n/5)/(n/5);
stem(n,fn,'fill');
error:X must be same length as Y.
函数是:f(n)=sin(n/5)/(n/5) (-20

MATLAB程序问题源程序:clear all;close all;n=-20*pi:pi/5:20*pi;fn=sin(n/5)/(n/5);stem(n,fn,'fill');error:X must be same length as Y.函数是:f(n)=sin(n/5)/(n/5) (-20
fn=sin(n/5)/(n/5);
改成
fn=sin(n/5)./(n/5);