matlab 不能使用xlabel提示错误如下>> sincxAttempted to access xlabel(120); index out of bounds because numel(xlabel)=1.Error in sincx (line 6)xlabel('x');程序如下x=linspace(0,10,21);y=sinc(x);subplot(2,1,1);plot(x,y);title('step=0.5');xl

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 07:25:42
matlab 不能使用xlabel提示错误如下>> sincxAttempted to access xlabel(120); index out of bounds because numel(xlabel)=1.Error in sincx (line 6)xlabel('x');程序如下x=linspace(0,10,21);y=sinc(x);subplot(2,1,1);plot(x,y);title('step=0.5');xl

matlab 不能使用xlabel提示错误如下>> sincxAttempted to access xlabel(120); index out of bounds because numel(xlabel)=1.Error in sincx (line 6)xlabel('x');程序如下x=linspace(0,10,21);y=sinc(x);subplot(2,1,1);plot(x,y);title('step=0.5');xl
matlab 不能使用xlabel
提示错误如下
>> sincx
Attempted to access xlabel(120); index out of bounds because numel(xlabel)=1.
Error in sincx (line 6)
xlabel('x');
程序如下
x=linspace(0,10,21);
y=sinc(x);
subplot(2,1,1);
plot(x,y);
title('step=0.5');
xlabel('x');
ylabel('sinc x');
无法对画出的sincx函数图形添加xlabel 和ylabel ,求问怎么解决

matlab 不能使用xlabel提示错误如下>> sincxAttempted to access xlabel(120); index out of bounds because numel(xlabel)=1.Error in sincx (line 6)xlabel('x');程序如下x=linspace(0,10,21);y=sinc(x);subplot(2,1,1);plot(x,y);title('step=0.5');xl

代码是没问题的,之所以出错,原因是你在之前(很可能是无意识地)把xlabel当作变量用了.

先clear一下就可以了.