![]() |
Matlab - How to perform a sparse eigendecomposition?
<p>I have a large <code>n * n</code> sparse matrix called <strong>L</strong>. constant <strong>k</strong> is a given value. I am supposed to do this:</p>
<blockquote> <p>perform a sparse eigendecomposition of the Laplacian L that computes only the eigenvectors associated with the k smallest-magnitude eigenvalues.</p> </blockquote> <p><a href="https://i.stack.imgur.com/4ZJWz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4ZJWz.png" alt="enter image description here"></a></p> <p>How can I do this?</p> <p>This is what I have tried:</p> <pre class="lang-matlab prettyprint-override"><code>d = diag(eigs(L,k,'smallestabs')); </code></pre> <hr> <p>And then I am supposed to do this:</p> <blockquote> <p>Then project matrix V (vertex positions) onto the basis spanned by these eigenvectors and reconstruct a filtered V called V_new (version of the mesh).</p> </blockquote> <p><a href="https://i.stack.imgur.com/h0XL5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h0XL5.png" alt="enter image description here"></a></p> <p><strong>P</strong> is not important here. I just want the new <strong>V</strong> based on the <strong>D</strong> matrix. Basically I want to calculate this:</p> <p><a href="https://i.stack.imgur.com/PLOU2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PLOU2.png" alt="enter image description here"></a></p> <p>I have tried this:</p> <pre class="lang-matlab prettyprint-override"><code>pd = padarray(diag(d),[n-k,n-k],0,'post'); V_new = V * pd * V' </code></pre> <p>But seems not to be working, because the resulting <strong>V_new</strong> is very different than <strong>V</strong>.</p> <p>What is the right way to do this?</p> [url=https://stackoverflow.com/questions/59053341/matlab-how-to-perform-a-sparse-eigendecomposition]More answer...[/url] |
所有时间均为北京时间。现在的时间是 21:27。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.