Re: [R] Random unit vectors in R^{n}

About this list Date view Thread view Subject view Author view Attachment view

From: A.J. Rossini (rossini@blindglobe.net)
Date: Tue 27 Aug 2002 - 09:27:25 EST


Message-id: <877kidqjz6.fsf@jeeves.blindglobe.net>


>>>>> "tom" == Tom Richards <Richards> writes:

    tom> Hello: Can you tell me if there's a simple way to generate in
    tom> R random vectors on the unit sphere in R^{n}? Additionally,
    tom> are there references for this question? Thanks in advance.

I suspect that you can generate them in R^n and then scale? (i.e.
use (x/|x|) ).

best,
-tony

-- 
A.J. Rossini				Rsrch. Asst. Prof. of Biostatistics
U. of Washington Biostatistics		rossini@u.washington.edu	
FHCRC/SCHARP/HIV Vaccine Trials Net	rossini@scharp.org
-------------- http://software.biostat.washington.edu/ ----------------
FHCRC: M: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email
UW:   Th: 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX
(my tuesday/wednesday/friday locations are completely unpredictable.)

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jun 2004 - 09:31:11 EST