Re: Plot function of a function of a variable
- To: mathgroup at smc.vnet.net
- Subject: [mg85302] Re: Plot function of a function of a variable
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Tue, 5 Feb 2008 19:40:04 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <fo9ggo$sjc$1@smc.vnet.net>
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