Generate Perturbation Matrices with Limit on the 2-Norm
3 次查看(过去 30 天)
显示 更早的评论
Hey guys,
I'd like to make a set of perturbation matrices. These have randomly generated (normally distributed) elements. In addition, in order to fit my specific application of the matrices, I'd like the diagonal elements to be zero. Otherwise, these are just sparse matrices with a 2-norm below some value L.
Only way I can think to do it is to randomly generate a set of matrices that fit these criteria and then test to see if they also fit the 2-norm criteria. If they don't the script would toss them out. This would involve some fine tuning since I'm not sure how many elements could be perturbed until none of the generated matrices fit the two norm criteria.
Any better ideas?
Thanks! Kevin
UPDATE:
A = random matrix with zeros on the diagonal
B = A' * A
% we know: norm(A,2) = sqrt(trace(A'*A)); thus
[U,S,V] = svd(B);
if sqrt(sum(diag(S))< L)
A = output
else
???
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!