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: plot by surface command
Replies: 1   Last Post: Oct 29, 2013 11:43 AM

 Messages: [ Previous | Next ]
 Curious Posts: 2,359 Registered: 12/6/04
Re: plot by surface command
Posted: Oct 29, 2013 11:43 AM

"Wajahat " <hallmark2004@hotmail.com> wrote in message <l4oja1\$b86\$1@newscl01ah.mathworks.com>...
> hi when i plot my program by plot3 command i have done it but by surface command i cant plz guide 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.9;
> 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')

% So, why can't you do it?
% What error message do you get?

% Can you comment-out the plot3 command and use
% your surface command and show us the
% syntax you use and the error message (if any)?

Date Subject Author
10/29/13 Wajahat Ahmed
10/29/13 Curious