matlab中用imagesc画图全是黑的怎么办?请高手指点 附程序 20
functioncalculate(C,std)loadX.mat;loadY.mat;C2=(C-std)/std;forj=1:1:300K=0;fork=1:1:3...
function calculate(C,std)
load X.mat;
load Y.mat;
C2=(C-std)/std;
for j=1:1:300
K=0;
for k=1:1:300
K=K+((X(k)-X(j))^2+(Y(j)-Y(k))^2)^-0.5;
end
Cs(j)=0;
for i=1:1:300
Cs(j)=Cs(j)+C2(i)/K*((X(i)-X(j))^2+(Y(j)-Y(i))^2)^-0.5;
end
end
[x1,y1]=meshgrid(0:100:30000,0:100:20000);
z1=griddata(X,Y,Cs,x1,y1,'v4');
imagesc(z1),colormap('hot'); 展开
load X.mat;
load Y.mat;
C2=(C-std)/std;
for j=1:1:300
K=0;
for k=1:1:300
K=K+((X(k)-X(j))^2+(Y(j)-Y(k))^2)^-0.5;
end
Cs(j)=0;
for i=1:1:300
Cs(j)=Cs(j)+C2(i)/K*((X(i)-X(j))^2+(Y(j)-Y(i))^2)^-0.5;
end
end
[x1,y1]=meshgrid(0:100:30000,0:100:20000);
z1=griddata(X,Y,Cs,x1,y1,'v4');
imagesc(z1),colormap('hot'); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询