Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: shortest distance between a point and vector (n dimension)
Date: Tue, 27 Dec 2011 14:28:08 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 17
Message-ID: <jdcklo$r6$1@newscl01ah.mathworks.com>
References: <jdav08$ru6$1@newscl01ah.mathworks.com> <jdb7g4$lfg$1@newscl01ah.mathworks.com> <jdcc5s$4t0$1@newscl01ah.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1324996088 870 172.30.248.47 (27 Dec 2011 14:28:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Dec 2011 14:28:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:753235

"Kevin " <k.amouzgar@gmail.com> wrote in message <jdcc5s$4t0$1@newscl01ah.mathworks.com>...
> thank you for your answer! 
> To be frank I am writing a code for genetic algorithm optimization, and I needed this for creating offspring from parents.
> lets assume g was the mean vector of (mou) number of parents .
> and x was one of parents for creating offspring. ( point P was one of the other parents)
> For creating the offspring  I also need (mou-1: other parents excluding x)  orthonormal basis that span the subspace perpendicular to vector d.
> Can i use 'orth' function?? How and if not what do you propose?

No. Read the help. orth gives you an orthonormal basis that
spans a set of vectors. You are apparently asking for a set
of basis vectors that span the null space, so vectors that
are orthogonal to your vector d.

This is the null space you are looking for, so use the function
null.

John