ngular values are needed to calculate, both show similar speed. See the following examples:</p><p>Generate a big matrix:</p><pre class="codeinput">A=randn(1000,1000)+i*randn(1000,1000);
</pre><p>Measure times when only sinular values are calculated:</p><pre class="codeinput">tic, S=svd(A,0); toc
tic, S=svd_lapack(A,0,<span class="string">'gesvd'</span>); toc
tic, S=svd_lapack(A,0,<span class="string">'gesdd'</span>); toc
</pre><pre class="codeoutput">Elapsed time is 4.230231 seconds.
Elapsed time is 4.41697