MathGroup Archive 2008

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

Search the Archive

Re: Plot function of a function of a variable


khollund at gmail.com wrote:

> Have some functions depending on A.
> v1[A], D1[A]. These functions have some constants defined in L94[m, s,
> r, l, t, c]
> v1 - can be interpreted as value of a firm
> D1 as value of debt
> A as "stock price"
> 
> Then I want to plot v1[A] vs D1[A]/v1[A] at A=100 and c changing from
> 0 to 15.
> Anyone know how to do this??
> 
> The following plots v1[A] when c goes from 0 to 15 if that is of any
> help.
> 
> Plot[{v1[100] /. L94[0.04, 0.20, 0.06, 0.5, 0.35, c]}, {c, 0, 15}]

The built=in function *ListPlot* should do what you are looking for. You 
have to generate a list of pairs (I use *Table* in the example below to 
do so) either before calling *ListPlot* or directly inside it. For instance,

ListPlot[Table[{v1[100], D1[100]/v1[100]} /.
    L94[0.04, 0.20, 0.06, 0.5, 0.35, c], {c, 0, 15}]]

HTH.
-- 
Jean-Marc


  • Prev by Date: Re: Best practice passing expressions to functions
  • Next by Date: Re: calculating an inverse matrix
  • Previous by thread: Plot function of a function of a variable
  • Next by thread: Equi-sized tick labels