I have a function that is a product made up of three (k) factors, each factor is two random variable R of Gaussian CDF And there is a subtraction with L. These random variables are defined according to the 4 parameters.
with the code below It shows how I plot the main function (according to two independent variables D and E) and how the random variable is calculated
sigma = 1; K = 3; Prince = {}; Apendo [Priyar, 1 / K + E]; What to do [APPENDO [PREIERS, 1 / K - E / (K - 1)], {C, 2, K}]; L [prers_, sigma_, d_, i_]: = do [maxwell = -infinity; Do [Val = (2 * sigma ^ 2 * log [Prince [[I]] / Prior [[J]]] + D ^ 2 (Jay ^ 2 - I ^ 2 + 2 (I - J)) / (2 (Jay - I) D); Return [maxVal];, {1};; [Prior_, sigma_, D ^ i_] = = [minVal = Infinity; do = (2 * sigma ^ 2 * log [prince [[ja]] / prir [[i]]] + d ^ 2 (i ^ 2 - j ^ 2 + 2 (J - I)) / (2 (I - J) D); Return [Val & lt; minvel, minwell = val, tap]; {j, i + 1, k}}; Return [ MinVal]; {1}; print [plot3d [product [if [r [preers, sigma, d, c] & lt; l [pre [Common Distribution [(C-1) D, Sigma] R [Preiors, Sigma, D, C]] - CDF [General Distribution [(C-1) D, {0, D [1, K] Gt; {all, all, all}, exxellab -> automated]];
Now, I want to integrate the function on D (the same area Plot in tax 3D, d = 0.01 to 5), and the results only to the plot, according to the independent variable e.
Use the code below '
print [plot [integrated [product [if [r [preiers, sigma, d, c] & lt; L [Preiors, Sigma, D, C] 0, (CDF [General Distribution [(C-1) D, Sigma] R [Priyres, Sigma, D, C]] - CDF [General Distribution [(C-1) D , [D, 0.01, 5}], {E, -1 / K, 1 - 1 / K}, [C, 1], PlotRange -> {All, All}, Axel Label -> Automated] ];
though , The resulting plot I do not expect it is stable and can be seen in the 3D plot Can not it be that anyone knows what is happening and what to do to get the real integration of the ceremony? Thanks in advance.
When you have the L
and R
results within the val
function symbolic (because e is not defined) Logical val & lt; is thus mandatory, and as a result,
/ P> minVal
is never set (such as L
and R
every Come back a Nant)
(Along with some other things also been cleaned ..)
sigma = 1; K = 3; Dear = Join [[1 / K + E}, Table [1 / K - E / (K - 1), {C, 2, K)}]; L [Prior0_, Sigma_, D_, I_, E0_]: = Module [{Preiers, Maxwell, Val, E}, Do [Maxwell = - Infinity; Prince = princes / / e - & gt; E0; Do [Val = (2 * sigma ^ 2 * log [Prince [[I]] / Prior [[J]]] + D ^ 2 (Jay ^ 2 - I ^ 2 + 2 (I - J)) / (2 (Jay - I) D); if [Valx> Maxwell, Maxwell = Vel]; {J, 1, I - 1}], {1}} maxVal]; [Priors0_, sigma_, d_, i_, E0_]: Modules [{Preiers, Maxwell, Val, E}, Priis = Princers / / E - & gt; E0; Min [Table] (2 * Sigma ^ 2 * Log [Prince [[J]] / Preiers [ [I]]] + d ^ 2 (i ^ 2 - j ^ 2 + 2 (j - i)) / (2 (i-j) d), {j, i + 1, k}}]]; G [d_? NumericQ, c_, e_]: = product [if [r [preiors, sigma, d, c, e] {all, all}, axel label -> automated]
Comments
Post a Comment