matlab错误求救>> x1=0:0.01:5; y1=x1*exp(-2*x1); subplot(1,2,1);

问题描述:

matlab错误求救
>> x1=0:0.01:5;
y1=x1*exp(-2*x1);
subplot(1,2,1); plot(x1,y1,’r’);
x2=-2:0.01:2;
y2=5*cos(3*pi*x2);
subplot(1,2,2); plot(x2,y2,’b’);
? Error using ==> mtimes
Inner matrix dimensions must agree.
1个回答 分类:综合 2014-10-01

问题解答:

我来补答
>>  x1=0:0.01:5; y1=x1.*exp(-2*x1);%%x1后面改为点乘 subplot(1,2,1); plot(x1,y1,'r');%%r的单引号用英文法输入 x2=-2:0.01:2; y2=5*cos(3*pi*x2);subplot(1,2,2); plot(x2,y2,'b');%%b的单引号用英文法输入
 
 
展开全文阅读
剩余:2000
下一页:fx的解析式