Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13803 > unrolled thread

Re: How to plot functions

Started byBob Hanlon <hanlonr357@gmail.com>
First post2013-03-10 21:06 +0000
Last post2013-03-10 21:06 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to plot functions Bob Hanlon <hanlonr357@gmail.com> - 2013-03-10 21:06 +0000

#13803 — Re: How to plot functions

FromBob Hanlon <hanlonr357@gmail.com>
Date2013-03-10 21:06 +0000
SubjectRe: How to plot functions
Message-ID<khisk6$mnq$1@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@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?
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web