MathGroup Archive 2011

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

Search the Archive

Re: plot of nmaximized result

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118441] Re: plot of nmaximized result
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Thu, 28 Apr 2011 06:35:28 -0400 (EDT)
  • References: <ip8o93$pjd$1@smc.vnet.net>

As the error message states your function is unbounded, so
maximization is useless. See for yourself by adding Plot[f, {z, -2,
2}] // Print; after the definition of f in your loop

Cheers -- Sjoerd

On Apr 27, 11:39 am, tarun dutta <tarundut... at gmail.com> wrote:
> this is the following program.here I want to plot between x VS max.but
> I can not get the result.
>
> Do[d = 2635/33859;
>  r = 0.6;
>  a1 = 0.7;
>  a2 = 0.13;
>  g = 33859;
>  b = 0.6631;
>  x = (b*j*(j + 1))/g;
>  f = (1/(a1 + a1*z + a2*z^2))*(b/g)*j*(j + 1) + (1 - Exp[-z])^2 +
>    d*Exp[-r*z];
>  {max, val} = NMaximize[f, z];
>  list1 = Print[(*"x= ",*)x];
>  list2 = Print[(*" max= ",*)max], {j, 0, 5}]
> ListPlot[{list1, list2}]
>
> any help will be appreciated.
> regards,
> tarun



  • Prev by Date: Re: Drawing a vector list
  • Next by Date: Re: complex equation
  • Previous by thread: plot of nmaximized result
  • Next by thread: Re: plot of nmaximized result