if true
u1=1;
u2=1;
u3=1;
u4=1;
a=0.1;
b=0.5;
g=0.25;
t=1;
A=12.*b.^2.*u3./u2;
v=(b.^2.*u1+4.*b.^4.*u3+g.*u4)./b;
x= -20:1:20;
y= -20:1:20;
z = -20:1:20;
u = A./(cosh(a.*x+b.*y+g.*z-v.*t).^2);
surf(x,y,z,u);
colorbar
end

댓글 수: 5

David Barry
David Barry 2016년 12월 11일
What's the question?
John D'Errico
John D'Errico 2016년 12월 11일
편집: John D'Errico 2016년 12월 11일
The crystal ball is foggy today. Who knows what the question is here? But the answer is probably 42.
kalim ul-haq tariq
kalim ul-haq tariq 2016년 12월 12일
I need 4D color Plot of U(x,y,z)
Walter Roberson
Walter Roberson 2016년 12월 12일
Do you mean that you want a volumetric plot with x, y, z as coordinates and u should be the color of each cuboid? If so then see vol3d in the file exchange
kalim ul-haq tariq
kalim ul-haq tariq 2016년 12월 12일
But how can apply vol3d to the given function u(x,y,z)

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2016년 12월 12일

0 개 추천

vol3d('cdata', u)
and also pass [-20,20] for the Xdata, Ydata, and Zdata parameters
vol3d is from the file exchange

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Crystals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by