7    0.7085
	P.U{3} = 
		    0.0487    0.8893
		    0.0000    0.0000
		    0.9988    0.4573
</pre><h2>Alternating least squares for Tucker model<a name="6"></a></h2><p>The function <tt>tucker_als</tt> computes the best rank(R1,R2,..,Rn) approximation of tensor X, according to the specified dimensions in vector R.  The input X can be a tensor, sptensor, ktensor, or ttensor.  The result returned in T is a ttensor.</p><pre class="codeinput">X = sptenrand([5 4 3], 10)
</pre><pre class="codeoutput">X is a sparse