Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Problem with combining plots (3D)' topicStudent Support Forum > General > "Problem with combining plots (3D)"

Next Comment >Help | Reply To Topic
Author Comment/Response
exw
06/25/12 5:13pm

Hi All,

My problem is basically in the Plot statement --> I want to plot TL for the range of 0<=x<=0.5 and 0.01<=psi<=1 and plot TU for the range of 0.5<x<=1 and 0.01<=psi<=1, both of these on one plot? I have tried to use the "Piecewise" function as well, but I have been unsuccessful!

I wold really appreciate if someone can please help me on this.

The code is:

j = 10;
s = 0; r = 0;

K[x_, psi_] :=
Sum[Sin[n*Pi*x]*
Sin[n*Pi*
psi]*(2*Exp[-(n*Pi)^2*
Abs[s + r]] - (Exp[-(n*Pi)^2*Abs[s - r]] -
Exp[-(n*Pi)^2*(s + r)])/(n*Pi)^2 ), {n, 1, j}];

TL[x_, psi_] = Integrate[K[x - y, psi]*y, {y, -10, 10}];

TU[x_, psi_] = Integrate[K[x - y, psi]*(1 - y), {y, -10, 10}];


Show[Plot3D[TL[x, psi], {x, 0, 0.5}, {psi, 0.01, 1},
AxesLabel -> {"x", "t", "y"},
PlotLabel -> {"Plot of Amodei's Solution to Heat Equation in \
Euclidean"}, Boxed -> False, Mesh -> False],
Plot3D[TU[x, psi], {x, 0.5, 1}, {psi, 0.01, 1}, Boxed -> False,
Mesh -> False]]

Thanks a million!


URL: ,

Subject (listing for 'Problem with combining plots (3D)')
Author Date Posted
Problem with combining plots (3D) exw 06/25/12 5:13pm
Re: Problem with combining plots (3D) Michael 07/07/12 1:36pm
Next Comment >Help | Reply To Topic