Artifact ae585da36624144cf4f0685cfac0255d314697ea6c536f5981f8a252f78d523b:



<A NAME=companion>

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



<B>COMPANION</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
<P>
<P>
 <P> <H3> 
syntax: </H3>
<em>companion</em>(&lt;poly&gt;,&lt;x&gt;) 
<P>
<P>
<P>
&lt;poly&gt; :- a monic univariate polynomial in &lt;x&gt;. 
<P>
<P>
&lt;x&gt; :- the variable. 
<P>
<P>
<em>companion</em>creates the companion matrix C of &lt;poly&gt;. 
<P>
<P>
This is the square matrix of dimension n, where n is the degree of 
&lt;poly&gt; w.r.t. &lt;x&gt;. 
<P>
<P>
The entries of C are: 
<P>
<P>
C(i,n) = -coeffn(&lt;poly&gt;,&lt;x&gt;,i-1) for i = 1 
 ... n, C(i,i-1) = 1 for i = 2 ... n and 
 the rest are 0. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>

companion(x^4+17*x^3-9*x^2+11,x); 


  [0  0  0  -11]
  [            ]
  [1  0  0   0 ]
  [            ]
  [0  1  0   9 ]
  [            ]
  [0  0  1  -17]

</TT></PRE><P>Related functions: 

<A HREF=r37_0588.html>find_companion</A>. 
<P>
<P>


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