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