📄 randomsphericalmatrix.m
字号:
function A = RandomSphericalMatrix(n,p)
% RandomSphericalMatrix: creates random (Gaussian) spherical matrix
% Usage
% A = RandomSphericalMatrix(n,p)
% Input
% n number of columns
% p number of rows
%
% Outputs
% A random spherical matrix
%
A = sign(randn(d,n) - .5);
z = find(A == 0);
A(z) = ones(size(z));
for j = 1:n
A(:,j) = A(:,j) ./ norm(A(:,j));
end
%% Part of SparseLab Version:100% Created Tuesday March 28, 2006% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail sparselab@stanford.edu%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -