Please help me, i would to make the color of the run 3D figure as the color of attached figure

조회 수: 17 (최근 30일)
T K
T K 2025년 10월 18일 3:18
댓글: Tarek 2025년 10월 18일 4:38
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)')

답변 (1개)

Walter Roberson
Walter Roberson 2025년 10월 18일 3:28
이동: Walter Roberson 2025년 10월 18일 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)')

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by