rand_orth.m

来自「The tca package is a Matlab program that」· M 代码 · 共 17 行

M
17
字号
function W=rand_orth(n,m);
% RAND_ORTH - random matrix with orthogonal columns

% Copyright (c) Francis R. Bach, 2002.

if (nargin<2)
   m=n;
end

W=rand(m)-.5;
[W,cococococo]=qr(W);
W=W(1:m,1:n);

W2=rand(m)-.5;
[W2,cococococo]=qr(W2);
W=W2*W;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?