Why Surface Plot is Black?

조회 수: 8 (최근 30일)
Mahmoud Baniasadi
Mahmoud Baniasadi 2016년 2월 1일
댓글: Walter Roberson 2019년 11월 10일
Hi I have a simple code as bellow. why the surface plot is black?
mi_x=3.75;
mi_y=113.75;
si_x=11.78511;
si_y=250.2842;
cor_coef=0.964811;
fxy1=(1/(2*pi*si_x*si_y*sqrt(1-cor_coef^2)));
exp1=-1/(2-2*cor_coef^2);
[x,y] = meshgrid(0:50,0:975);
exp2=(((x-mi_x)/si_x).^2-2.*cor_coef*(x-mi_x).*(y-mi_y)/si_x/si_y+((y-mi_y)/si_y).^2);
fxy=fxy1.*exp(exp1.*exp2);
surf(x,y,fxy);
Why Plot is black!! I tried codes in help, but it didn't work for me !
Thanks

채택된 답변

Walter Roberson
Walter Roberson 2016년 2월 1일
Change to
surf(x, y, fxy, 'edgecolor', 'none');
  댓글 수: 3
maaham banu
maaham banu 2019년 11월 4일
Hi it's not working for me.
Walter Roberson
Walter Roberson 2019년 11월 10일
maaham banu could you confirm that you are getting a surface output, and that you used edgecolor none, but that the surface is all black? If so is it possible that your colormap is all black, or that you have a caxis() call in effect?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by