フィルターのクリア

How can I set the color of a surfplot?

1 回表示 (過去 30 日間)
Martin
Martin 2014 年 3 月 4 日
回答済み: Walter Roberson 2014 年 3 月 4 日
Hello,
i have created a 3d-mesh with following code
if true
RTHETA=-pi/2:0.03:pi/2;%Polar
RPHI=0:0.03:2*pi; %Azimut
[THETA PHI]=meshgrid(RTHETA,RPHI);
ZP=abs(sinc(15*sin(THETA).*cos(PHI)/pi).*sinc(5*sin(THETA).*sin(PHI)/pi));
end
Now I want to plot this function in sphere coordinates. So I did a transform:
if true
I=ZP.*sin(THETA).*cos(PHI);
J=ZP.*sin(THETA).*sin(PHI);
K=ZP.*cos(THETA);
end
Now I want to plot this
if true
surf(I,J,K)
end
It works, but the color map is not so perfect. Because you cant almost see no details. Now I want to set the color of a point corresponding to its curvature. I found the function:
if true
Q=surfature(I,J,K);
end
And there was no error, but now I dont know how to combine it with my plot. Can you help me with this? Thank you!
Kind Regards Martin

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 3 月 4 日
surf(I, J, K, Q)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by