MathGroup Archive 2008

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

Search the Archive

Piecewise and multiple values

Hi all,

in brief my problem: I'm using mathematica to create the solutions for
problems that actually came in few different versions (meaning that
the problem in the same, but the initial data change). Suppose I ave
version 1 in which m=3,k=1,..., version 2 in which m=5,k=2,... and so
on... Typically, I use an approach like:


Then I write and solve the general symbolic equations, and the replace
the values with the above rule, like:

sol = Solve[...]

obtaining a list of numerical solutions corresponding to the different
set of data contained in the "data" list, like:

{(num sol corresponding to m=3,k=5,...),(num sol corresponding to

This works very well for me, because it allows me to solve the problem
once and check the numerical solution for all the different versions
at a glance.

The problem arises in the case I have to use a Piecewise function. In
this case I define:

      | f   x<z
h = |
      | g   x>z

but when I evaluate


I obtain something like:

      | {f1,f2,...}     x<{z1,z2,...}
h = |
      | {g1,g2,...}   x>{z1,z2,...}

that I don't know how to plot or "disentagle", i.e. obtain expressions

        | f1     x<z1
h1 = |
        | g1    x>z1

        | f2     x<z2
h2 = |
        | g2    x>z2

and so on...

Do you have any suggestion? I would prefer to retain my data
replacement scheme, and just understand how to create "disentangled"
piecewise functions...



  • Prev by Date: Re: Re: delta function
  • Next by Date: Re: Happy Birthday Mathematica!
  • Previous by thread: Boolean constraints in plot functions
  • Next by thread: Re: Piecewise and multiple values