[R] find all unit vectors which are orthogonal to a given vector
peter dalgaard
pdalgd at gmail.com
Fri Oct 30 00:55:53 CET 2015
> On 30 Oct 2015, at 00:03 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
> On 29/10/2015 6:38 PM, Marco Inacio wrote:
>> Is there a function in R to get the set of all unit vectors which are
>> orthogonal to a given vector?
>
> No.
Building blocks should be there, though. The last n-1 columns of
Q <- qr.Q(qr(cbind(v, diag(nrow=length(v)))))
looks like a good start.
The full set is an n-1 dimensional sphere in n-space, spanned by those column vectors. If you need more than that representation, some further assembly is required.
-pd
>
> Duncan Murdoch
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list