Problems? Is your data what you think it is? PerlMonks

### Re^11: Randomly biased, random numbers.

by educated_foo (Vicar)
 on Dec 08, 2013 at 01:24 UTC ( #1066169=note: print w/replies, xml ) Need Help??

in reply to Re^10: Randomly biased, random numbers.
in thread Randomly biased, random numbers.

Your translation looks correct, so I'm a bit surprised by the result. I only tested it in 1-D, but the histogram looked plenty spiky. You could make it spikier by raising the random numbers used to generate @fx to some power, but it sounds like you found another solution.
• Comment on Re^11: Randomly biased, random numbers.

Replies are listed 'Best First'.
Re^12: Randomly biased, random numbers.
by BrowserUk (Pope) on Dec 08, 2013 at 07:36 UTC
You could make it spikier by raising the random numbers used to generate @fx to some power

Indeed, adding a power component causes much more clumpiness, and making the power component variable:

my @fx = @{ reduce( sub{ push @\$a, \$a->[-1]+\$b; \$a }, [ 0 ], map{ rand()**rand +(3) } 1..10 ) };

gives a nice variability.

But yes, I am currently much enamoured of my weight-map solution. Some of the grey-scale images it produces are just downright beautiful :)

But thankyou for your input. The vectorising of the 3D weight-map to 1D weight-stick my solution uses. came directly from your example, and I understand a little more about matlab/octave now :)

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
 Username: Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066169]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2018-06-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should cpanminus be part of the standard Perl release?

Results (126 votes). Check out past polls.

Notices?