4D colur plot

14 Ansichten (letzte 30 Tage)
kalim ul-haq tariq
kalim ul-haq tariq am 11 Dez. 2016
Beantwortet: Walter Roberson am 12 Dez. 2016
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 Kommentare
Walter Roberson
Walter Roberson am 12 Dez. 2016
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 am 12 Dez. 2016
But how can apply vol3d to the given function u(x,y,z)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Dez. 2016
vol3d('cdata', u)
and also pass [-20,20] for the Xdata, Ydata, and Zdata parameters
vol3d is from the file exchange

Weitere Antworten (0)

Kategorien

Mehr zu Crystals finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by