File r37/lisp/csl/html/r37_0607.html artifact 74abfefc99 part of check-in 9992369dd3



<A NAME=random_matrix>

<TITLE>random_matrix</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>RANDOM_MATRIX</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
<P>
<P>
 <P> <H3> 
syntax: </H3>
<em>random_matrix</em>(&lt;r&gt;,&lt;c&gt;,&lt;limit&gt;) 
<P>
<P>
<P>
&lt;r&gt;,&lt;c&gt;,&lt;limit&gt; :- positive integers. 
<P>
<P>
<em>random_matrix</em>creates an &lt;r&gt; by &lt;c&gt; matrix with random 
entries in the range -limit &lt;entry &lt;limit. 
<P>
<P>
Switches: 
<P>
<P>
<em>imaginary</em>:- if on then matrix entries are x+i*y where -limit &lt;x,y 
 &lt;&lt;limit&gt;. 
<P>
<P>
<em>not_negative</em>:- if on then 0 &lt;entry &lt;&lt;limit&gt;. In the imagina
ry 
 case we have 0 &lt;x,y &lt;&lt;limit&gt;. 
<P>
<P>
<em>only_integer</em>:- if on then each entry is an integer. In the imaginary 
		 case x and y are integers. 
<P>
<P>
<em>symmetric</em>:- if on then the matrix is symmetric. 
<P>
<P>
<em>upper_matrix</em>:- if on then the matrix is upper triangular. 
<P>
<P>
<em>lower_matrix</em>:- if on then the matrix is lower triangular. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>

on rounded; 

random_matrix(3,3,10); 

  [ - 8.11911717343    - 5.71677292768   0.620580830035 ]
  [                                                     ]
  [ - 0.032596262422    7.1655452861     5.86742633837  ]
  [                                                     ]
  [ - 9.37155438255    - 7.55636708637   - 8.88618627557]



on only_integer, not_negative, upper_matrix, imaginary; 

random_matrix(4,4,10); 

  [70*i + 15  28*i + 8   2*i + 79   27*i + 44]
  [                                          ]
  [    0      46*i + 95  9*i + 63   95*i + 50]
  [                                          ]
  [    0          0      31*i + 75  14*i + 65]
  [                                          ]
  [    0          0          0      5*i + 52 ]

</TT></PRE><P>

REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]