Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: soliton with surface
Replies: 0

 Wajahat Ahmed Posts: 18 From: pakistan Registered: 10/12/13
soliton with surface
Posted: Nov 8, 2013 11:57 AM

hi i want to plot a soliton solution in matlab but when we run the program in matlab i got a soliton without surface,,if anyone of you have any idea plz share me
my program is

x=-3:0.1:3;
t=-2:0.1:2;
A=0.4;
Mo=1;
lo=2e-10;
to=5.7392e-12;
mu=0.1;
omega=0.3;
k=1;
w=0.1;
nu=4*3.1416e-7;
xo=-3.5;
g=nu/(Mo*lo^2);
W=0.5*sqrt(mu^2-4*g*A^2);
S=-i*w*lo^2*mu;
L=-W-0.5*mu;
[X,T]=meshgrid(x,t);
p=omega*T-k*X;
thetha=2*real(W)*X+2*real(W*S)*T-xo;
phi=2*imag(W)*X+2*imag(W*S)*T;
Q=A*(L*exp(thetha)+conj(L)*exp(-thetha))+(abs(L)).^2*exp(i*phi)/sqrt(g)+sqrt(g)*A^2*exp(-i*phi);
D=((abs(L)).^2+g*A^2)*cosh(thetha)+2*sqrt(g)*A*real(L)*cos(phi);
Z=(A+mu*Q/D)*exp(i*p);
plot3(X,T,Z,'linewidth',1)
grid on
xlabel('X');ylabel('T');zlabel('Z')