Author |
Message |
Stephane Thibodeau (tbodo)
New member Username: tbodo
Post Number: 1 Registered: 06-2008
| Posted on Friday, June 27, 2008 - 06:13 pm: | |
Hello, I'm a beginner in using FlexPDE and I'm not able to find how to use the PI function (Capital Greek pi). Note: The PI function is the same as "sum" except is a multiplication: PI(var., start, end, expression) Ex: PI(a,1,5,a^-1) mean multiplication of 1/1 x 1/2 x 1/3 x 1/4 x 1/5 = 1/120! Another quick question about the "loop"! I want to create a number of random points in a variable range (as example, one point by unit length). How can I do to fix the density of points INDEPENDENT of the length of that range? If I have a good understand, I can’t use "loop for" with FlexPDE…is it true? Thanks! T-bodo |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1145 Registered: 06-2003
| Posted on Friday, June 27, 2008 - 07:48 pm: | |
1. FlexPDE doesn't implement a PI (product) function. You'll have to use an EXP of a SUM of LN'S. 2. FlexPDE doesn't have a LOOP statement. There is a REPEAT ... ENDREPEAT capability, which is a textual repeat. See "Repeat" in the Help Index. 3. You can use the RANDOM(arg) function to generate a random number uniform in (0,arg). FIXED POINT(RANDOM(2),RANDOM(2)) for example, will generate a gridding point somewhere in the square (0,2)(0,2). You can do arithmetic on random numbers to create variables with non-uniform probability density. See textbooks on probability theory or Monte Carlo methods. |
|