C Internal Functions</A>
<B> Previous:</B> <A NAME="tex2html512" HREF="node41.html"> r = rand(nm)</A>
<BR> <P>
<H1><A NAME="SECTION005370000000000000000"> r = diag(matrix) or r=diag(vector)</A></H1>
<P>
Given matrix return diagonal entries as a vector. Given vector return matrix
with diagonal elements from vector.  r = diag(diag(a)) gives matrix with diagonal
elements from matrix a, otherwise elements are zero.
<P>
<BR> <HR>
<P><ADDRESS>
<I>Juha Ruokolainen <BR>
Fri Feb 14 15:59:30 EET 1997</I>
</ADDRESS>
<