From octave-sources-request at bevo dot che dot wisc dot edu Thu Jan 11 01:37:36 2001 Subject: Re: improved/corrected dot.m From: Dirk Laurie To: Rolf Fabian Cc: "'octave-sources UWISC'" Date: Thu, 11 Jan 2001 09:37:23 +0200 Rolf Fabian skryf: > Appended is an improved/corrected version of > the dot script function, which allows for switching between > the two legal flavours of an inner product definition. > They differ by returning complex conjugated results > for input of complex vectors. > >From the mathematical point of view, the dot product of two column vectors A and B can only be A'*B. This is because the relationship dot(A,A) == norm(A)^2 needs to be satisfied. It is not a Matlab peculiarity to define it that way, rather Matlab defines it thus because the inventor of Matlab is a mathematician. IMHO it is misleading and dangerous to have a routine dot.m that could possibly give A.'*B instead. I would strongly prefer a separate routine with a different name for the latter case, e.g. udot.m for "unconjugated dot". Dirk ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------