Please help me, i would to make the color of the run 3D figure as the color of attached figure
조회 수: 17 (최근 30일)
이전 댓글 표시
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
답변 (1개)
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)
disp(c)
surf(X,T,f,'EdgeColor','none');
colormap hsv
colorbar
xlabel('x'); ylabel('t'); zlabel('u(x,t)')
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
