Skip to content
Snippets Groups Projects
Commit 08754124 authored by manxilin's avatar manxilin
Browse files

02610

parent 4beb0ceb
No related branches found
No related tags found
No related merge requests found
File added
File added
File added
File added
File added
File added
File added
function A = genA(tau)
if tau<=0 || tau>=1
error('tau need be in (0,1)!');
end
n = 500;
A = speye(n);
rng(100);
R = rand(n)*2-1;
R = R-diag(diag(R));
A = A+R;
A = (A+A')/2;
Ind = abs(A)>tau;
A(Ind) = 0;
A = A+speye(n);
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment