Re: How to plot functions
- To: mathgroup at smc.vnet.net
- Subject: [mg130115] Re: How to plot functions
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Sun, 10 Mar 2013 17:07:12 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20130310054802.BF9A66790@smc.vnet.net>
Your function is only defined when the argument is the symbol c (unless you have previously set c to a value). You should use a pattern in the function definition. f[c_] = c*x^2; Plot[f[3], {x, -10, 10}] Bob Hanlon On Sun, Mar 10, 2013 at 12:48 AM, radres <radressss at gmail.com> wrote: > Hi, > > Let's say I've defined a function f[c]=c*x^2 > > when I try to plot this directly, > > Plot[ f[3], {x, -10, 10} ] > > it doesn't plot anything. > > But when I assign function to a variable, > > v1=f[3]; Plot[v1, {x, -10, 10}] > > then there is no problem. But I dont want this. Is there any way to plot directly from a function? >
- References:
- How to plot functions
- From: radres <radressss@gmail.com>
- How to plot functions