annotate toolboxes/FullBNT-1.0.7/nethelp3.3/dist2.htm @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 <html>
wolffd@0 2 <head>
wolffd@0 3 <title>
wolffd@0 4 Netlab Reference Manual dist2
wolffd@0 5 </title>
wolffd@0 6 </head>
wolffd@0 7 <body>
wolffd@0 8 <H1> dist2
wolffd@0 9 </H1>
wolffd@0 10 <h2>
wolffd@0 11 Purpose
wolffd@0 12 </h2>
wolffd@0 13 Calculates squared distance between two sets of points.
wolffd@0 14
wolffd@0 15 <p><h2>
wolffd@0 16 Synopsis
wolffd@0 17 </h2>
wolffd@0 18 <PRE>
wolffd@0 19 d = dist2(x, c)
wolffd@0 20 </PRE>
wolffd@0 21
wolffd@0 22
wolffd@0 23 <p><h2>
wolffd@0 24 Description
wolffd@0 25 </h2>
wolffd@0 26 <CODE>d = dist2(x, c)</CODE> takes two matrices of vectors and calculates the
wolffd@0 27 squared Euclidean distance between them. Both matrices must be of the
wolffd@0 28 same column dimension. If <CODE>x</CODE> has <CODE>m</CODE> rows and <CODE>n</CODE> columns, and
wolffd@0 29 <CODE>c</CODE> has <CODE>l</CODE> rows and <CODE>n</CODE> columns, then the result has
wolffd@0 30 <CODE>m</CODE> rows and <CODE>l</CODE> columns. The <CODE>i, j</CODE>th entry is the
wolffd@0 31 squared distance from the <CODE>i</CODE>th row of <CODE>x</CODE> to the <CODE>j</CODE>th
wolffd@0 32 row of <CODE>c</CODE>.
wolffd@0 33
wolffd@0 34 <p><h2>
wolffd@0 35 Example
wolffd@0 36 </h2>
wolffd@0 37 The following code is used in <CODE>rbffwd</CODE> to calculate the activation of
wolffd@0 38 a thin plate spline function.
wolffd@0 39 <PRE>
wolffd@0 40
wolffd@0 41 n2 = dist2(x, c);
wolffd@0 42 z = log(n2.^(n2.^2));
wolffd@0 43 </PRE>
wolffd@0 44
wolffd@0 45
wolffd@0 46 <p><h2>
wolffd@0 47 See Also
wolffd@0 48 </h2>
wolffd@0 49 <CODE><a href="gmmactiv.htm">gmmactiv</a></CODE>, <CODE><a href="kmeans.htm">kmeans</a></CODE>, <CODE><a href="rbffwd.htm">rbffwd</a></CODE><hr>
wolffd@0 50 <b>Pages:</b>
wolffd@0 51 <a href="index.htm">Index</a>
wolffd@0 52 <hr>
wolffd@0 53 <p>Copyright (c) Ian T Nabney (1996-9)
wolffd@0 54
wolffd@0 55
wolffd@0 56 </body>
wolffd@0 57 </html>