File r37/lisp/csl/html/r37_0574.html artifact b4367f9175 part of check-in a57e59ec0d



<A NAME=add_to_columns>

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



<B>ADD_TO_COLUMNS</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
Add to columns, add to rows: 
<P>
<P>
 <P> <H3> 
syntax: </H3>
<em>add_to_columns</em>(&lt;matrix&gt;,&lt;column\_list&gt;,&lt;expr&gt;) 
<P>
<P>
<P>
&lt;matrix&gt; :- a matrix. 
<P>
<P>
&lt;column\_list&gt; :- a positive integer or a list of positive 
 integers. 
<P>
<P>
&lt;expr&gt; :- a scalar expression. 
<P>
<P>
<em>add_to_columns</em>adds &lt;expr&gt; to each column specified in 
&lt;column\_list&gt; of &lt;matrix&gt;. 
<P>
<P>
<em>add_to_rows</em>performs the equivalent task on the rows of 
&lt;matrix&gt;. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>

add_to_columns(A,{1,2},10); 

  [11  12  3]
  [         ]
  [14  15  6]
  [         ]
  [17  18  9]



add_to_rows(A,2,-x) 

   
  [   1         2         3    ]
  [                            ]
  [ - x + 4   - x + 5   - x + 6]
  [                            ]
  [   7         8         9    ]

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

<A HREF=r37_0572.html>add_columns</A>, 
<A HREF=r37_0573.html>add_rows</A>, 
<A HREF=r37_0604.html>mult_rows</A>, 

<A HREF=r37_0603.html>mult_columns</A>. 
<P>
<P>


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