MathGroup Archive 2002

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

Search the Archive

Plot several graphs generated by Table

  • To: mathgroup at
  • Subject: [mg36424] Plot several graphs generated by Table
  • From: muhnochwaaa at (muh nochwaaa)
  • Date: Fri, 6 Sep 2002 03:16:55 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

myArray is a list of triplets which look like {n,k,p}, where n and k
are integers  and p is real number. repetitions in n and k are allowed
but no two triplets ar the same.

I define a function, myfunc[n_,pthreshold_] as follows.

myfunc[n_,pthreshold_] := Module[{t},
t=Max[Cases[myArray, {n, k_, p_} /; (p >= pthreshold) -> p, 2]];

It prints the largest k for which p is greater than pthreshold for a
given n and
-1 if there is no such k.  The function does its job fine. 

My problem is as follows. I would like to plot a collection of plots,
myfunc[n,p], for 1<=n<=21 with respect to p. unfortunately the
following does not work as desired.


because the Table gets evaluated to numeric value (-1) before Plot is
How could I accomplish this? Thanks in advance for all your helps.

  • Prev by Date: Re: Running Mathematica in background.
  • Next by Date: ListIntegrate Info.
  • Previous by thread: Re: Plotting The Slope field of a differential equation
  • Next by thread: Re: Plot several graphs generated by Table