source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/adjoint.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 433 bytes
Line 
1function A = adjoint(X)
2% ADJOINT Computes adjoint matrix
3%
4% A = ADJOINT(X)
5%
6% Brute-force implementation
7
8[n,m] = size(X);
9if n~=m
10    error('Matrix must be square');
11end
12
13A = [];
14if n == 1
15    A = X;
16    return
17end
18
19% Ugly brute-force
20for i = 1:n
21    temp = [];
22    noti = setdiff(1:n,i);
23    for j = 1:n
24        notj = setdiff(1:n,j);
25        temp = [temp det(X(noti,notj))*((-1)^(i+j))];
26    end
27    A = [A;temp];
28end
29A = A';
30
Note: See TracBrowser for help on using the repository browser.