# Re: Why doesn't this work ?

• To: mathgroup@smc.vnet.net
• Subject: [mg10411] Re: Why doesn't this work ?
• From: Julian Stoev <stoev@SPAM-RE-MO-VER-usa.net>
• Date: Tue, 13 Jan 1998 02:07:15 -0500
• Organization: Seoul National University, Republic of Korea
• References: <69cole\$ep5@smc.vnet.net>

```On 12 Jan 1998, Andreas Keese wrote:

|But why doesn't it work with more than one functions ? |
|  Clear[S2];
|  S2={Sin[x],Cos[x]};
|  Plot[S2, {x, 0, Pi}]

Hi, Andreas!

This works:

Clear[S2]
S2={Sin[x],Cos[x]};
Plot[Evaluate[S2], {x, 0, Pi}]

|gives an error - Mathematica complains that S2 is not a machine-size
|number.
|
|BTW: I don't want S2 to be pattern cause I want to use this as follows:
|
|  Clear[S,dx,S3,x];
|  S[x_]:={Sin[x/dx], Cos[x/dx], Sin[2*x/dx]}; |  S3=Evaluate[S[x] /. dx
-> 2];
|  Plot[S3, {x, 0, Pi}];

This may be:

Clear[S,dx,S3,x]
S[x_]:={Sin[x/dx], Cos[x/dx], Sin[2*x/dx]}
S3=S[x]/. dx -> 2
Plot[Evaluate[S3], {x, 0, Pi}]

Your problem is in Evaluate[]. Look in the help. The example given there
will explain you why you have this problem.

Hope this helps.

--------------------------------------------------------------------------
Julian Stoev <j.h.stoev@ieee.org>       - Ph. D. Student Intelligent
Information Processing Lab. - Seoul National University, Korea

```

• Prev by Date: Re: Why doesn't this work ?
• Next by Date: Re: ``flattening" systems of equations
• Prev by thread: Re: Why doesn't this work ?
• Next by thread: Re: Why doesn't this work ?