Please help me, i would to make the color of the run 3D figure as the color of attached figure
17 views (last 30 days)
Show older comments
x=-20:0.1:20; t=-15:0.1:15;
[X,T]=meshgrid(x,t);omega=0.11;b=0.01;sig=sqrt(omega-10*b);
alfa=0.1 ;a=0.1;c=-(alfa+2*a*k);k=alfa/a;
v1=(2*b)/(omega-sig^2+k*(a*k-alfa));
f=(exp(1./((-v1*(1)*((-6/5)-(1/(2)) *(tanh(v1.*1.5*(X-c*T))).^2)))));
disp(v1)
disp(c)
surf(X,T,f,'EdgeColor','none');
colorbar
xlabel('x'); ylabel('t'); zlabel('u(x,t)')

0 Comments
Answers (1)
Walter Roberson
on 18 Oct 2025 at 3:28
Moved: Walter Roberson
on 18 Oct 2025 at 3:29
x=-20:0.1:20; t=-15:0.1:15;
[X,T]=meshgrid(x,t); omega=0.11 ;b=0.01; sig=sqrt(omega-10*b);
alfa=0.1; a=0.1; k=alfa/a; c=-(alfa+2*a*k);
v1=(2*b)/(omega-sig^2+k*(a*k-alfa));
f=(exp(1./((-v1*(1)*((-6/5)-(1/(2)) *(tanh(v1.*1.5*(X-c*T))).^2)))));
disp(v1)
disp(c)
surf(X,T,f,'EdgeColor','none');
colormap hsv
colorbar
xlabel('x'); ylabel('t'); zlabel('u(x,t)')
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!