source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/test_sqdist.m
@
177
Last change on this file since 177 was 37, checked in by , 15 years ago | |
---|---|
File size: 242 bytes |
Line | |
---|---|
1 | x = [1 2; 3 4]; |
2 | A = x*x'; |
3 | sqdist(x,x) |
4 | sqdist(x,x,A) |
5 | |
6 | niter = 2; |
7 | x = randn(300); |
8 | A = x*x'; |
9 | fprintf('Euclidean:') |
10 | tic; for iter = 1:niter sqdist(x,x); end; toc |
11 | fprintf('Mahalanobis:') |
12 | tic; for iter = 1:niter sqdist(x,x,A); end; toc |
Note: See TracBrowser
for help on using the repository browser.