Is it possible Matlab shows the grid on the surface of the plot?

27 ビュー (過去 30 日間)
Wajahat
Wajahat 2020 年 4 月 4 日
回答済み: Walter Roberson 2020 年 4 月 4 日
close all;
X=-10:.1:10;
T=-10:.1:10;
%i=1;
w0=1;
c=-1;
mu1=.4*1i;
a=2*mu1.^2-(2*w0.^2);
[x,t]=meshgrid(X,T);
u=2*(1i*mu1.*x-(1i*mu1*c./(a)).*t);
r1=-4*1i*mu1*sin(u);
surf(x,t,abs(r1));
shading flat;
%grid off;
view(-48,68)
Is it possible Matlab shows the grid on the surface of the plot? i.e.

回答 (2 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 4 月 4 日
編集済み: KALYAN ACHARJYA 2020 年 4 月 4 日
Change the faceAlpha (within 0 and 1) value, see, it may heps you (This is transperancy)
surf(x,t,abs(r1),'FaceAlpha',0.5);
Or Try this one:
X=-10:.1:10;
T=-10:.1:10;
%i=1;
w0=1;
c=-1;
mu1=.4*1i;
a=2*mu1.^2-(2*w0.^2);
[x,t]=meshgrid(X,T);
u=2*(1i*mu1.*x-(1i*mu1*c./(a)).*t);
r1=-4*1i*mu1*sin(u);
h=surf(x,t,abs(r1));
shading interp;
set(h,'edgecolor','m')
% Similarly you can change the face color also for more visible.
view(-48,68)

Walter Roberson
Walter Roberson 2020 年 4 月 4 日
X=-10:.1:10;
T=-10:.1:10;
%i=1;
w0=1;
c=-1;
mu1=.4*1i;
a=2*mu1.^2-(2*w0.^2);
[x,t]=meshgrid(X,T);
u=2*(1i*mu1.*x-(1i*mu1*c./(a)).*t);
r1=-4*1i*mu1*sin(u);
h = surf(x,t,abs(r1));
shading flat;
%grid off;
view(-48,68)
h.EdgeColor = 'k';
However, you have so many edges in this plot that when you turn the edges back on, the entire plot will look black.

カテゴリ

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