Generating random vectors

Hey folks,

I need an algorithm to generate random vectors. Restriction on vectors are as follows:

a) so they lie in an dimensional hyperplane going through zero.

b)

c) The density is uniform, e.g. each vector satisfying conditions a) and b) is picked with equal probability.

Example: and are both OK as long as they are generated with the same probability.

Thanks:)

Re: Generating random vectors

Use whatever random number generator you like to get values for , , ..., between -1 and 1, then calculate .

Re: Generating random vectors

Sorry, but your method does not neccessarily guarantee that is satisfied, for example if all your draws from to are equal to one and .

Re: Generating random vectors

@HallsofIvy any other ideas? I would be really thankful since I think this one is easy and it's just me who's stupid :)