MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Manipulate function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100962] Re: [mg100926] Manipulate function
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Thu, 18 Jun 2009 20:47:54 -0400 (EDT)
  • References: <200906180854.EAA20058@smc.vnet.net>
  • Reply-to: drmajorbob at bigfoot.com

1) Your posted definition of M[x] makes no sense. Maybe you meant

M[x_] := If[x < 0, n Sin[x], Cos[x]]

not

M[x_]:=If[x < 0, n Sin[x], Cos[x]], {x, -10, 10}]

(which isn't a valid expression).

2) M[x] appears NOT to depend on n (I don't see any "n", do you?), and  
Manipulate assumes it doesn't.

So try this instead:

Manipulate[Plot[m[n, x], {x, -10, 10}], {n, 0, 1}]

Bobby

On Thu, 18 Jun 2009 03:54:34 -0500, Przemyslaw Swatek
<pspsswatek at gmail.com> wrote:

> hi !
>
> I have some problem (Mathematica 6) - when I type
> Manipulate[Plot[If[x < 0, n Sin[x], Cos[x]], {x, -10, 10}], {n, 0, 1}]
> all is ok, but when i try:
>
> M[x_]:=If[x < 0, n Sin[x], Cos[x]], {x, -10, 10}] and then
>
> Manipulate[Plot[M[x], {x, -10, 10}], {n, 0, 1}] it doesn`t work - I
> cannot manipulate varible of n. Whay ?
>



-- 
DrMajorBob at bigfoot.com


  • Prev by Date: Re: How to define the coefficients of a polynomial to be real?
  • Next by Date: Re: How to downsample a image matrix using left and right
  • Previous by thread: Manipulate function
  • Next by thread: Re: Manipulate function