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


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

Re: Plot function with two arguments

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-10-13 07:52 +0000
Last post2011-10-13 07:52 +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: Plot function with two arguments DrMajorBob <btreat1@austin.rr.com> - 2011-10-13 07:52 +0000

#5624 — Re: Plot function with two arguments

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-10-13 07:52 +0000
SubjectRe: Plot function with two arguments
Message-ID<j765bu$2cp$1@smc.vnet.net>
f[x_, k_] := (k*x^2 - x)/(x - k)
Plot[Evaluate@Table[f[x, k], {k, -3, 3}], {x, -20, 20}]

Remove Evaluate, and all the curves will be the same color.

Bobby

On Wed, 12 Oct 2011 02:43:01 -0500, Momo K <momok1994@googlemail.com>  
wrote:

> Hello,
>
> I want to plot the function f. It is defined as followed:
>
> f[x_, k_] := (k*x^2 - x)/(x - k)
>
> As you see, it takes two arguments. In fact it shall represent a family  
> of
> curves, but I didn't find any way different to this to define one.
>
> My aim is to plot the function by plot firstly f[x, -3], then f[x, -2],  
> f[x,
> -1], f[x, 0], ...
> Is there a way to do this automatically without typing every single  
> function
> with k adjusted. I imagined something like {{x,-20,20}, {k,-3,3}} or so.
>
> Many thanks
> and best regards
>
> Momo


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


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


csiph-web