Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11929 > unrolled thread
| Started by | Murta <rodrigomurtax@gmail.com> |
|---|---|
| First post | 2012-10-03 07:12 +0000 |
| Last post | 2012-10-03 07:12 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Get Distribution from Interpolated Function Murta <rodrigomurtax@gmail.com> - 2012-10-03 07:12 +0000
| From | Murta <rodrigomurtax@gmail.com> |
|---|---|
| Date | 2012-10-03 07:12 +0000 |
| Subject | Get Distribution from Interpolated Function |
| Message-ID | <k4gogh$398$1@smc.vnet.net> |
Hi All
I'm trying to get a distribution from an interpolated function but with no success.
(*Creating Dist from interpolation*)
ff = Interpolation[Table[{i, 1 + RandomReal[1]}, {i, 0, 10, 1}], Method -> "Spline"];
dist = ProbabilityDistribution[ff[x], {x, 0, 10}];
(*Plot Interpolation ok!*)
Plot[ff[x], {x, 0, 10}]
(*Plot Dist ok!*)
Plot[Evaluate@PDF[dist, x], {x, 0, 10}]
(*do not work as spected, the histogram don't have the curve format*)
randonData = RandomVariate[dist, 100000];
Histogram[randonData, {0.1}, "Probability", PlotRange -> {{0, 10}, All}]
tks in advance
Murta
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web