source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/logdet.m
Last change on this file was 37, checked in by , 15 years ago | |
---|---|
File size: 246 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function y = logdet(A) |
2 | % log(det(A)) where A is positive-definite. | |
3 | % This is faster and more stable than using log(det(A)). | |
4 | ||
5 | % Written by Tom Minka | |
6 | % (c) Microsoft Corporation. All rights reserved. | |
7 | ||
8 | U = chol(A); | |
9 | y = 2*sum(log(diag(U))); |
Note: See TracBrowser
for help on using the repository browser.