gsvd.m
来自「vTools is a toolbox for Matlab 5.3 devel」· M 代码 · 共 21 行
M
21 行
function [u1,u2,x,c,s]=gsvd(a,b)
% [u1,u2,x,c,s]=gsvd(a,b) Generalized Singular Value Decomposition
% of matrices A and B. The two matrices must have the same number
% of columns and A cannot have more columns than rows. The
% GSVD is a joint decomposition of the form
% U1'*A*X = C and U2'*B*X = S
% where X is nonsingular and U1 and U2 are orthogonal matrices.
% C and S are diagonal matrices (not necessarily square) whose
% diagonal entries are nonnegative. Furthermore the diagonal
% entries of C are in nondecreasing order and
% C'* C + S'* S = I
% ( Submitted by S. J. Leon )
[q,d,z]=svd([a;b],0);
[m,n]=size(a);[p,n]=size(b);
q1=q(1:m,:);q2=q(m+1:m+p,:);
[u1,u2,v,c,s]=csd(q1,q2);
x=z*(d\v);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?