0
$\begingroup$

enter image description here

Basically I'm trying to create a Matlab script where I can create the the Matrix S with diagonal entries as shown in equation 4 of the picture for different sizes n. However, I'm really struggling to do this. I can find the reduced SVD completely fine, it's just the creation of this 'S' matrix that I can't work out

$\endgroup$
0
$\begingroup$

Given $\Sigma_1$, you can use the MATLAB's command $\texttt{diag()}$ to extract the diagonal elements of the matrix. After that, use element-wise operations to calculate the diagonal elements of $S$, and finally, use $\texttt{diag()}$ again to form the matrix $S$. It would look something like this:

[U1,Sigma,V] = svd(A,0);
d_Sigma = diag(Sigma);
d_S = d_Sigma./(d_Sigma.^2 + mu);
S = diag(d_S);
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.