Cancel
Showing results for
Did you mean:

# Re: Insert Paralogistic Distribution in Source  Siemens Phenom

Your code should work, but the following code is simpler (and a little bit faster too):

```is
do
-- generate an integer from 1 to 213
local n: integer := z_uniform(1, 1, 214);

if n <= 124 then  -- 1-124 will become 1
n := 1;
elseif n <= 186 then -- 125-186 will become 2
n := 2;
elseif n <= 203 then -- and so on
n := 3;
elseif n <= 210 then
n := 4;
else
n := 5;
end;
....```

Note: If you have many cases, you could use the function 'z_emp' instead.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.

# Re: Insert Paralogistic Distribution in Source Valued Contributor
Thank you Michael,
I have one last question:
if I want to insert a Lognormal distribution instead of a paralogistic, having the lognormal parameter 1 = 6.5 and parameter 2 = 5.4, lower limit = 1 and upper limit = 41, and I tryed witl z_Lognormal(1, 6.5, 5.4 [1,41]). The software tells me :"An implicit list access using [x,y] can only be made within a list formula".

# Re: Insert Paralogistic Distribution in Source  Siemens Phenom

You need to pass the lower bound and the upper bound as two optional parameters separated with a comma:

z_LogNormal(1, 6.5, 5.4, 1, 41)

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button. 