<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>setfield</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>September 1999</DATE>
  <SHORT_DESCRIPTION name="setfield">  list field insertion</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>setfield(i,x,l)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>x</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: matrix  of any  possible types</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>l</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: list, tlist or mlist variable</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>i</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: field index, see insertion for more details.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P>
    This function is an equivalent of <VERB>l(i)=x</VERB> syntax for field
    extraction with the only difference that it also applies to
    <VERB>mlist</VERB> objects.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
l=list(1,'qwerw',%s)
l(1)='Changed'
l(0)='Added'
l(6)=['one more';'added']
//

a=hypermat([2,2,2],rand(1:2^3));// hypermatrices are coded using mlists
setfield(3,1:8,a);a // set the field value to 1:8
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>insertion</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
