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)
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;
Unrecognized function or variable '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');
colorbar
xlabel('x'); ylabel('t'); zlabel('u(x,t)')

Answers (1)

Walter Roberson
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)
0.2000
disp(c)
-0.3000
surf(X,T,f,'EdgeColor','none');
colormap hsv
colorbar
xlabel('x'); ylabel('t'); zlabel('u(x,t)')

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!