我的程序是
function sim=my_SIR1(k1,k2)
n1=0.7;
n2=0.2;
p=0.3;
q=0.6;
nu=0.41;
mu=0.59;
lam=10;
n1=n1-1;
n2=n2-1;
q=p*q-1;
p=p-1;
a=(k1*k2*n2*q+k1*n2+k2*q+1)*mu;
b=(k1*k2*n1*p+k1*n1+k2*p+1)*lam;
sim=(nu+a)/b;
function my_SIR3
[x,y]=meshgrid(0:0.03:1);
z=my_SIR1(x,y);
close all
meshc(x,y,z);
axis([0 1 0 1 0 inf])
title('阈值sim随k1,k2变化曲面')
xlabel('k1')
ylabel('k2')
zlabel('sim')
错误提示
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 9.791268e-020.
QQ求大神
function sim=my_SIR1(k1,k2)
n1=0.7;
n2=0.2;
p=0.3;
q=0.6;
nu=0.41;
mu=0.59;
lam=10;
n1=n1-1;
n2=n2-1;
q=p*q-1;
p=p-1;
a=(k1*k2*n2*q+k1*n2+k2*q+1)*mu;
b=(k1*k2*n1*p+k1*n1+k2*p+1)*lam;
sim=(nu+a)/b;
function my_SIR3
[x,y]=meshgrid(0:0.03:1);
z=my_SIR1(x,y);
close all
meshc(x,y,z);
axis([0 1 0 1 0 inf])
title('阈值sim随k1,k2变化曲面')
xlabel('k1')
ylabel('k2')
zlabel('sim')
错误提示
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 9.791268e-020.
QQ求大神