Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5416 > unrolled thread
| Started by | icegood <icegood1980@gmail.com> |
|---|---|
| First post | 2011-10-06 08:24 +0000 |
| Last post | 2011-10-07 09:07 +0000 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
How to use PDF for function definition? icegood <icegood1980@gmail.com> - 2011-10-06 08:24 +0000
Re: How to use PDF for function definition? Peter Pein <petsie@dordos.net> - 2011-10-07 08:46 +0000
Re: How to use PDF for function definition? Todd <johnson.todd.r@gmail.com> - 2011-10-07 08:47 +0000
Re: How to use PDF for function definition? Peter Breitfeld <phbrf@t-online.de> - 2011-10-07 09:07 +0000
| From | icegood <icegood1980@gmail.com> |
|---|---|
| Date | 2011-10-06 08:24 +0000 |
| Subject | How to use PDF for function definition? |
| Message-ID | <j6jok6$m5c$1@smc.vnet.net> |
Code: kla = 1.3; nla = 1; Clear[z, PDFla]; PDFla[z_] := PDF[GammaDistribution[kla, nla/kla], z] ; PDFLa[3] Output: PDFLa[3] How to use it? By documentation i can also try simply PDFla := PDF[GammaDistribution[kla, nla/kla]] that defines 'pure function', but result is the same. How to use it in right way. P.S. Where can i find a proper database for 'mathematica' bugs?
[toc] | [next] | [standalone]
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Date | 2011-10-07 08:46 +0000 |
| Message-ID | <j6me8p$75e$1@smc.vnet.net> |
| In reply to | #5416 |
Am 06.10.2011 10:24, schrieb icegood: > Code: > kla = 1.3; nla = 1; > Clear[z, PDFla]; > PDFla[z_] := PDF[GammaDistribution[kla, nla/kla], z] ; > PDFLa[3] > > Output: > PDFLa[3] > > How to use it? By documentation i can also try simply PDFla := > PDF[GammaDistribution[kla, nla/kla]] that defines 'pure function', but > result is the same. How to use it in right way. > > P.S. Where can i find a proper database for 'mathematica' bugs? > have a look for a database containing upper and lower case letters as different elements instead ;-)
[toc] | [prev] | [next] | [standalone]
| From | Todd <johnson.todd.r@gmail.com> |
|---|---|
| Date | 2011-10-07 08:47 +0000 |
| Message-ID | <j6mebl$77h$1@smc.vnet.net> |
| In reply to | #5416 |
On Oct 6, 4:24 am, icegood <icegood1...@gmail.com> wrote: You used a lowercase "l" in the function definition, but an uppercase L in the function call: PDFLa. Changing this gives: In[108]:= kla = 1.3; nla = 1; Clear[z, PDFla]; PDFla[z_] := PDF[GammaDistribution[kla, nla/kla], z] ; PDFla[3] Out[111]= 0.0441056 But if you want the result to be a pure function you need to add & to your function definition: In[112]:= kla = 1.3; nla = 1; Clear[z, PDFla]; PDFla[z_] := PDF[GammaDistribution[kla, nla/kla], z] &; PDFla[3] Out[115]= PDF[GammaDistribution[kla, nla/kla], 3] & > Code: > kla = 1.3; nla = 1; > Clear[z, PDFla]; > PDFla[z_] := PDF[GammaDistribution[kla, nla/kla], z] ; > PDFLa[3] > > Output: > PDFLa[3] > > How to use it? By documentation i can also try simply PDFla := > PDF[GammaDistribution[kla, nla/kla]] that defines 'pure function', but > result is the same. How to use it in right way. > > P.S. Where can i find a proper database for 'mathematica' bugs?
[toc] | [prev] | [next] | [standalone]
| From | Peter Breitfeld <phbrf@t-online.de> |
|---|---|
| Date | 2011-10-07 09:07 +0000 |
| Message-ID | <j6mfg1$7le$1@smc.vnet.net> |
| In reply to | #5416 |
If you respect the case sensitivity and write PDFla instead of PDFLa you get the ouput 0.0441056. icegood wrote: > Code: > kla = 1.3; nla = 1; > Clear[z, PDFla]; > PDFla[z_] := PDF[GammaDistribution[kla, nla/kla], z] ; > PDFLa[3] > > Output: > PDFLa[3] > > How to use it? By documentation i can also try simply PDFla := > PDF[GammaDistribution[kla, nla/kla]] that defines 'pure function', but > result is the same. How to use it in right way. > > P.S. Where can i find a proper database for 'mathematica' bugs? > -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web