clear;
[X Y]=meshgrid(10:10:1000);
ind1=find(X<=Y&0<Y&Y<=400&X>0);%索引行和列
ind2=find(X<=Y&Y>400&X>0);
ind3=find(X>Y+70&0<Y&Y<=400&X>0);
ind4=find(Y+70>=X&X>Y&0<Y&Y<=400&X>0);
ind5=find(X>Y+70&Y>400&X>0);
ind6=find(Y+70>=X&Y>400&X>Y&X>0);
P=zeros(100);
P(ind1)=2973.29*X(ind1)-97.44*Y(ind1);
P(ind2)=5773.29*X(ind2) - 3067.69*Y(ind2)+ 80077.78;
P(P==0)=NaN;
P(ind3)=-1895.48*X(ind3)+ 4783.77*Y(ind3)+ 303479.50;
P(ind4)=2726.84*X(ind4)+ 161.4 图 4*Y(ind4)- 20083.0;
P(ind5)=-1895.48*X(ind5)+ 4583.77*Y(ind5)+ 383479.50;
P(ind6)=2726.85*X(ind6)- 40.0*Y(ind6)+ 60494.78;
mesh(X,Y,P);
the code is as above
and how could i fill different faces with different colors?