Skip to main content

Questions tagged [random]

Questions about random number generation and the properties of numbers so generated.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Including absorbing boundary (surface) for a continuous stochastic process on a complex domain

Often of interest are stochastic processes with absorbing boundaries (states). However, Mathematica does not natively include functionality to deal with absorption. In one spatial dimension there is a ...
CRTmonitor's user avatar
1 vote
2 answers
71 views

Randomly replace some letters in words with hyphen

I have a list containing some related words ...
monfneg's user avatar
  • 659
2 votes
1 answer
92 views

How to use Mathematica to find the explicit formula of expected value of minimum of multiple uniform distributions?

...
138 Aspen's user avatar
  • 1,902
2 votes
1 answer
56 views

Wishart distribution implementation with positive semidefinite scale matrix

The built-in Mathematica function WishartMatrixDistribution[\[Nu],\[CapitalSigma]] requires a positive definite (PD) scale matrix ...
András Aszódi's user avatar
4 votes
1 answer
130 views

How can I generate a random number within a function and use the result repeatedly in the same function?

I want to write a function that will randomly select an element in a list of arbitrary length and operate on it. For example, if I have L = RandomInteger[100, {10}] ...
andring's user avatar
  • 393
3 votes
1 answer
214 views

How to use Mathematica to find the maximum expected value of multiple normal distributions?

Is it possible to calculate the maximum expected value of $ n (n\geq 2) $ independent (identical distributed) random variables that follow a normal distribution? If possible, how to find it? If it ...
138 Aspen's user avatar
  • 1,902
2 votes
1 answer
63 views

Why is random sampling with ordinary and compiled code so different?

Consider the following code: ...
John Taylor's user avatar
  • 5,923
7 votes
1 answer
218 views

Early computer art - Frieder Nake's "Walk Through Raster"

Frieder Nake Frieder Nake (born 1938 in Stuttgart, Germany) is a mathematician, computer scientist, and pioneer of computer art. Nake is one of the "3N" computer pioneers, an abbreviation ...
eldo's user avatar
  • 82.4k
0 votes
2 answers
60 views

Automatic matrix operations with parameters obtained by random numbers

I have matrix T defined by 2 parameters: T = {{0, 0, 0},{0, 0, a},{0, a, b}}; These 2 parameters are randomly generated by means: ...
Gae P's user avatar
  • 657
13 votes
3 answers
2k views

Michael Noll's early computer art - arranging graphic elements in a circular manner

Michael Noll A. Michael Noll (born 1939 in Newark, New Jersey) is an American engineer and professor emeritus at the Annenberg School for Communication and Journalism at the University of Southern ...
eldo's user avatar
  • 82.4k
2 votes
1 answer
109 views

Fast sampling from Fermi-Dirac distribution under specific conditions

This question is a continuation of the following one. Let us assume a Fermi-Dirac (FD) distribution (times $p^{2}$): ...
John Taylor's user avatar
  • 5,923
1 vote
1 answer
121 views

How to quickly sample from the following distributions

Consider the following distributions: ...
John Taylor's user avatar
  • 5,923
5 votes
2 answers
519 views

Fill a matrix with randomly placed elements that are a certain distance apart

Problem statement I want to populate a matrix of points with randomly placed elements, here denoted as x. In all matrix rows there must be an equal number of x-...
eldo's user avatar
  • 82.4k
1 vote
1 answer
95 views

How to compile the following code (sampling from a distribution)?

Consider the following code: ...
John Taylor's user avatar
  • 5,923
0 votes
0 answers
52 views

How to quickly sample points according to the given distribution?

Consider the following points sampler: ...
John Taylor's user avatar
  • 5,923
0 votes
1 answer
82 views

Resampling the points with a constraint [closed]

I have a list of npts elements energies obeying some arbitrary distribution. By performing some operation many times, it would ...
John Taylor's user avatar
  • 5,923
2 votes
0 answers
58 views

Why RandomSample fails and how to fix this?

Consider the following sampling: weights = 10^RandomReal[{-13, Log10[35]}, 499500]; vals = Range[Length[weights]]; randomvals = RandomSample[weights -> vals]; ...
John Taylor's user avatar
  • 5,923
4 votes
2 answers
141 views

How to speed up the following algorithm?

I have some random combinations of numbers pairs (where numbers range from 1 to some ntest) ...
John Taylor's user avatar
  • 5,923
16 votes
1 answer
521 views

Reproducing Heinrich Heidersberger's Rhythmograms

Heinrich Heidersberger (1906 - 2006) was born in Ingolstadt, Germany, and grew up in Austria. He studied architecture in Graz, which he abandoned in favor of art. From 1928 until 1931 he lived in ...
eldo's user avatar
  • 82.4k
0 votes
1 answer
78 views

How to select non-repeating pair of numbers?

Consider the following combinations of integers comb, where the integers range from 1 to n ...
John Taylor's user avatar
  • 5,923
11 votes
1 answer
302 views

Early computer art - reproducing Harold Cohen's turtle drawings

Harold Cohen Harold Cohen (1928 - 2016) was a British pioneer of computer-generated art. After his studies at the Slade School of Fine Arts in London he became soon well known in London as an abstract ...
eldo's user avatar
  • 82.4k
18 votes
1 answer
357 views

Can we emulate Paul Henry's drawing machine?

Desmond Paul Henry Desmond Paul Henry $(1921-2004)$ was a Manchester University Lecturer and Reader in Philosophy. He was one of the British pioneers of Computer Art. Henry with Drawing Machine 2, ...
eldo's user avatar
  • 82.4k
0 votes
0 answers
59 views

How to make the following pairing?

Consider the following list of identifiers: Npart=5000; ilist=Range[1,Npart]; And parameters belonging to the given identifier: ...
John Taylor's user avatar
  • 5,923
19 votes
3 answers
1k views

Vera Molnár's interruptions - erasing graphic elements

Vera Molnár Vera Molnár (1924 - 2023) was a Hungarian artist who, like Victor Vasarely, lived and worked in France. She was one of the pioneers of computer graphics. Trained as a traditional artist, ...
eldo's user avatar
  • 82.4k
7 votes
1 answer
155 views

Creating a Random T-Spline Instead of a B-Spline

I want to be able to create a function so that instead of BSplineSurface[pts], it would be TSplineSurface[pts,error]. I think it ...
Teg Louis's user avatar
  • 114
4 votes
3 answers
503 views

Efficiently fill an ellipse with a k-many random ellipses

So, I can create a circle filled with circles of the same radius that gives this example picture: with this code: ...
Teg Louis's user avatar
  • 114
7 votes
1 answer
296 views

How to condition all cells of a notebook to a specific SeedRandom?

Is there a way to fix SeedRandom[.] for an entire notebook? If I carry out many calculations using random numbers, I need to give a separate code ...
Tugrul Temel's user avatar
  • 6,263
6 votes
3 answers
244 views

Incrementing a random element of an array repeatedly

Consider this code to simulate a simple instance of the coupon collector problem. We initialize an array to {0, 0} and then keep incrementing a random element until we've incremented every element at ...
dreeves's user avatar
  • 696
0 votes
2 answers
93 views

Appending Random Number to Existing List

My goal is to append random number to list like below.The problem is whenever I try appending a random number, the previously created numbers are changed which I don't know why. How to add a random ...
Soon's user avatar
  • 648
6 votes
2 answers
249 views

Split a sequence with conditions

I need a function which splits a sequence of arbitrary length at x random points and which guarantees that each partition (bin) contains a minimum of ...
eldo's user avatar
  • 82.4k
1 vote
1 answer
100 views

Unwanted reevaluation in Manipulate with RandomPointConfiguration

Here is a simple illustration of a problem I am encountering. I want to use RandomPointConfiguration inside Manipulate, but it ...
Russ Lyons's user avatar
1 vote
2 answers
179 views

How to use first time generated randomly matrix? [closed]

I'm trying to solve one (very little) problem. :) I've generated 3x3 randomly matrix with V[i_, j_] := Table[RandomInteger[{-10i, 10j}], {3}, {3}]; Now I want to ...
stoboja's user avatar
  • 19
0 votes
0 answers
41 views

Combinations of distributions to be called with `RandomVariate`

I'd like to manipulate distributions that I'm going to retrieve using RandomVariate; e.g., I would like to take ...
zjs's user avatar
  • 153
11 votes
4 answers
1k views

How to create a random zonogon?

A zonogon is a polygon that is convex and is made only out of pairs of parallel sides with the same length. Any regular polygon with an even number of sides is an example of a zonogon. When I use: <...
Teg Louis's user avatar
  • 114
3 votes
2 answers
189 views

Approximate a Wiener Process by a Karhunen-Loève expansion

I'm trying to approximate a Wiener Process by a Karhunen-Loeve expansion (see slide 20) with the following code: ...
Stratus's user avatar
  • 2,964
3 votes
2 answers
214 views

Fill data points within the boundary established by the given points

I have the following data points: ...
葉柏樂's user avatar
  • 157
1 vote
1 answer
90 views

How to select the points that belong to the given region?

Consider two regions: ...
John Taylor's user avatar
  • 5,923
2 votes
1 answer
221 views

Applying NDSolveValue on a differential equation

I am trying to solve stochastic Schrodinger equation (Schrodinger equation in the presence of Ornstein Uhlenbeck Process) $$i\frac{d}{dt}\begin{pmatrix}c_1(t)\\ c_2(t)\end{pmatrix}=H(t)\begin{pmatrix}...
Radmehr's user avatar
  • 51
4 votes
5 answers
240 views

How to delete the complex numbers which are generated in a list of numbers?

Here I have generated a list of numbers ...
Sangeeta Dey's user avatar
1 vote
0 answers
114 views

Random Seed and Parallelization in Compiled Functions

I am having trouble reproducing a random number from a compiled function with parallelization even with the random seed being set. Specifically, running the following script should give the same value ...
Kohei's user avatar
  • 11
3 votes
2 answers
144 views

How can I use replacement rules with randomized values? [closed]

Suppose I have a list that I want to use replacement rules to replace each occurrence of a a given symbol with a randomly selected value, with this choice being randomized for each occurrence. For a ...
erfink's user avatar
  • 1,109
1 vote
0 answers
44 views

How can I use RandomFunction to solve an SDE in reverse time?

I am working with a problem of the Ito-stochastic differential form given by $$\mathrm{d}x=g(x,t)\,\mathrm{d}t+f(x,t)\,\mathrm{d}W,$$ where $W$ is a Wiener process. I furthermore have to satisfy the ...
JAC's user avatar
  • 21
3 votes
2 answers
117 views

Update Random Each Repetition of Animate

I found a solution that's not what I wanted but it will suffice Thanks - Larry ...
L. Gorham's user avatar
1 vote
3 answers
155 views

Plotting Average Positions of 2D Random Walk

I need to generate a plot that shows the averaged position at n steps of 1000 different random walks that are each 1000 steps long. So far I am using ...
Mandty24's user avatar
0 votes
1 answer
78 views

How to get the time series of colored noise obtained by AudioGenerator function?

In the documentation I found a code that plots a Periodogram. ...
Maksim's user avatar
  • 1
1 vote
1 answer
101 views

How to get randomly arranged image in Mathematica?

I'm now thinking about randomly arrangement of the imported image. After importing 2 hand-written images, image1 and image2, I want to make each 5 copys and randomly arrange them in one graph, i.e. ...
rani's user avatar
  • 365
0 votes
0 answers
74 views

How to generate points belonging to some region very fast?

Consider two variables Ex,th. th ranges within thmin=10^-5; thmax=Pi/2; while ...
John Taylor's user avatar
  • 5,923
4 votes
1 answer
277 views

Illustrating the central limit theorem

I'm working on this question is from Wolfram Mathematica online course. I tried my best to find the answer, still not getting it right The question is: Make a list of histograms of 10000 instances of ...
Ratheesh's user avatar
  • 327
1 vote
1 answer
102 views

Why is generating normalized random $1000 \times 1000$ matrices and plotting the eigenvalues so slow?

For each of the distributions $N(0,1)$ and $\pm 1$ equal probability and for each of $N \in \{5,10,20,50,100,200,1000\},$ I want to generate an $N \times N$ matrix with entries chosen from the ...
Display name's user avatar
1 vote
1 answer
156 views

Wolfram Mathematica Monte Carlo for integrals approximation

I wanted to implement the Monte Carlo method for multiple integrals approximation in Wolfram Mathematica. Namely I wanted to let the user insert as input the dimension of the integral and the number ...
Greg's user avatar
  • 11

1
2 3 4 5
19