i want to write a program to simulate a walk of a drunken sailor who walks out of a bar at the centre of a city. the city has a regular pattern of 24\24 square blocks. the sailor doesnt know where he is going and how to exist teh city. the question is how many blocks will he have to walk to exit the city?
let him start at the centre of the city and assume that he exists the city when he reaches either north, east, south or western borders. it can happen that he wlks...
Consider a simple polymer , which consist of long chains of simple molecules attached to each other, e.g:
....-CH2-CH2-CH2-...
If the interaction energy between consecutive sections ca be ignored or is low enough, the chain can be bend around at varios places to form varios configurations. One can start by fixing the first section to a particular co-ordinate and then add additional components by use of random walk with...
Hi,
I have a simulation file consisting of a number of modelica custom componets and maple custom components. I initially generated Random Data with mean 1 and standard deviation 0.5. Constructed all the blocks and combined with a multibody system, it worked fine. However, when I generated Random data with zero mean, then I have this error/problem "Simulation Problem: maximum number of event iterations reached (100) at 1.85000".
I used a couple of pre() function with clock=sample(0,0.01...
Dear Maple users
I am having a problem with a simple for loop. I cannot seem to figure out what is wrong. I want to define a number of Random Variables of the ChiSquare kind, with increasing number of degrees of freedom as the figure below suggest. When defining them one line after another everything works well. My idea was then to make a for loop, since I might want many Random Variables defined. It doesn't work however in the way I do it. All...
i want to write a program to simulate a walk of a drunken sailor who walks out of a bar at the centre of a city. the city has a regular pattern of 24\24 square blocks. the sailor doesnt know where he is going and how to exist teh city. the question is how many blocks will he have to walk to exit the city?
let him start at the centre of the city and assume that he exists the city when he reaches either north, east, south or western borders. it can happen that he wlks...
Hi,
I need to generate random gaussian noise and every time when I run the simulation I need to use same noise sequences. So I need to assign a noise seed. This is like Matlab command "randn(state,'123456')". There is one similiar function "randn()" in Modelica, but it just allows us to assign a seed and generate a value which is always the same value during whole simulation unless we change the noise seed. Do you have any idea to generate this kind of Gaussian noise in MapleSim/Modelica?
Re random is it possible for man or machine to create any two objects the same i suggest not,we may be only talking about such small differences that are possible undetectable (number of atoms per object) however a difference and if there is then each object will have it's own characteristics ie two lottery balls if you could study trillions of thows i'm suggesting you would see a pattern it may be so slight but not totally truly radom
Hi, I am very new to Maple and i was using Maple with a code that was running well when suddenly the rand() function that i use started to fail. and i get the error:
> rand();
Error, empty number
also i get many aditional errors in some sentences where i am addressed to some '?' simbols which are supposed to be in my sentendes.
has anyone gone trhough that? any help will be appreciated.
josep
I want to plot a random ... no, sorry, normal distribution of points around a line. Let's supose we use the line sin(x) from x=0..2*Pi as an example.
I want to do a Monte Carlo study with the following probability distribution:
P(X=x):=(x-1)*q^(x-2)*(p^2+(2*(1-p-q))*p)+binomial(x-1, x-3)*q^(x-3)*((1-p-q)^3+(1-p-q)^2*p);
with x = 2. 3, ... infinity and parameters p and q with 0 < p+q < 1. For the Monte Carlo study I ave to generate samples with specified values of p and q. For this I have yo do something similar to:
use Statistics in T:=[1/2,0,0,0,0,0,1/2];
d:=Distribution(ProbabilityTable(T));
Ok, I want to generate a series like the one below:
I the first period the value is 0. In the second period
we can either move up one or down one. In the third
period given a down move in the last period we can
either move down again [-1-1] or we can move up [-1+1]
Given a up move in the last period we can
either move down [+1-1] or we can move up [+1+1]
[0]
[-1], [+1]
[-1-1],[-1+1],[+1-1],[+1+1]
Does there exist any maple command that does this?
How many randomly ordered signals are required until we achieve a chaotic signal, or one that is undistinguishable from being random?
Another way to put it, although not a good example, is if we had an infinitely large room full of people talking, what is the minimum number of people needed to be to make the noise appear random? Of course making a few unrealistic conditions such as the volume of each persons speech is heard at the same level and pitch no matter their distance...
I have the following Maple worksheet:
restart;
randomize();
select1 := combinat[randperm]([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
Because of the "randomize" function, each time I execute this worksheet I should expect a different output. However, the real output is always the same every time. Is this a bug in combinat[randperm]() or am I missing something?
Attached file: randperm1.mw
This is more of a blog entry, mostly a note to myself.
I wanted to generate a list of points on the surface of a deformed sphere. It turns out that Robert recently showed how to do that on a unit sphere.
http://www.mapleprimes.com/questions/35962-Limited-Random-Points-Plot-On-A-Surface#comment66936
Adapting his code is straightforward. So here is what I came up with. One proc generates the random points on the surface of the ellipsoid. Another proc generates...
Dear All,
Hi. I am interested to find the pdf of this moment function: phi(t) = exp(a * b / p (e^(a*t) -1))
This is a moment of random variable Y = aX where X is a Poisson random variable with rate (a*b/p)
I want to know is it possible to find a pdf from its moment in maple?
If so how?
Best Regards,
Saeid