Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Basic plotting of an evaluated function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86881] Basic plotting of an evaluated function
  • From: "lederer at ssb.rochester.edu" <lederer at ssb.rochester.edu>
  • Date: Tue, 25 Mar 2008 01:15:15 -0500 (EST)

I am trying to do something basic--but I cannot figure it out


I have some function in two varaibles

f[x_,y_]= some arbitrary polynomial

Now I want to minimize the function with respect to y over some
compact interval with fixed x

NMinimize[{f[x,y],y=995,y=989},y]

I want to plot the y's versus the x's.

I have tried many things like defining

s[x_]=Part[NMinimize[{f[x,y],y=995,y=989},y],2]

Plot[s[x],{x,-14, 46}]

or variations

Plot[tt/.s[x],{x,-14, 46}].

Many error messages or nothing at all results.........

I am sure this is easy, and someone can suggest how to do this.

However, one more thing would be greatly helpful (give a man a decent
and readable Mathematica manual and he can feed himself...)

I am baffled by what Mathematica wants when it comes to using a single
part of a list and changing it to a scalar.  Suppose as above q is a
vector with a rule assigning a value to some variable x  that is x-
>some number, and this assignment is in the third position of the list

What is going on with  q/.d[[3]] for example: Is q now a scalar?  If
not why  not?

Thanks for you help,

Phil Lederer


  • Prev by Date: Importing text files
  • Next by Date: Re: Saving Packages
  • Previous by thread: Re: Importing text files
  • Next by thread: Re: Basic plotting of an evaluated function