下面这语句错在哪里?clc;clear; syms c1 c2 xfor c1=(1+eps):.1:2;for c2=0:.1:1;k=2;M=[c1 c2];y=k*x^(c1-1)-(1-x)^(c2-1);xx=solve(y,x);for i=1:1:length(xx);g=(c1-1)*k*xx(i)^(c1-2)-(c2-1)*(1-xx(i))^(c2-2);aa=solve(g,xx(i)); %matlab说这里有问

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 21:30:57
下面这语句错在哪里?clc;clear;symsc1c2xforc1=(1+eps):.1:2;forc2=0:.1:1;k=2;M=[c1c2];y=k*x^(c1-1)-(1-x)^(c2-1);

下面这语句错在哪里?clc;clear; syms c1 c2 xfor c1=(1+eps):.1:2;for c2=0:.1:1;k=2;M=[c1 c2];y=k*x^(c1-1)-(1-x)^(c2-1);xx=solve(y,x);for i=1:1:length(xx);g=(c1-1)*k*xx(i)^(c1-2)-(c2-1)*(1-xx(i))^(c2-2);aa=solve(g,xx(i)); %matlab说这里有问
下面这语句错在哪里?
clc;clear; syms c1 c2 x
for c1=(1+eps):.1:2;
for c2=0:.1:1;
k=2;M=[c1 c2];
y=k*x^(c1-1)-(1-x)^(c2-1);xx=solve(y,x);
for i=1:1:length(xx);
g=(c1-1)*k*xx(i)^(c1-2)-(c2-1)*(1-xx(i))^(c2-2);
aa=solve(g,xx(i)); %matlab说这里有问题,但我不懂啊,求救~
if aa0;
M=100;
end
end
end
end
image(M)

下面这语句错在哪里?clc;clear; syms c1 c2 xfor c1=(1+eps):.1:2;for c2=0:.1:1;k=2;M=[c1 c2];y=k*x^(c1-1)-(1-x)^(c2-1);xx=solve(y,x);for i=1:1:length(xx);g=(c1-1)*k*xx(i)^(c1-2)-(c2-1)*(1-xx(i))^(c2-2);aa=solve(g,xx(i)); %matlab说这里有问
aa=solve(g,xx(i)); 这里的xx(i),不是未知数,g的表达式里也都是已知量,aa=solve(y,x)中应该x是未知量,y是x的函数才行.