Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^11: Randomly biased, random numbers.

by educated_foo (Vicar)
on Dec 08, 2013 at 01:24 UTC ( [id://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 (Patriarch) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1066169]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found