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

29 visualizzazioni (ultimi 30 giorni)
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.

Risposte (2)

KALYAN ACHARJYA
KALYAN ACHARJYA il 4 Apr 2020
Modificato: KALYAN ACHARJYA il 4 Apr 2020
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 il 4 Apr 2020
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.

Community Treasure Hunt

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

Start Hunting!

Translated by