<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - Allan CORNET
 * 
 * This file is released into the public domain
 *
 -->
<refentry version="5.0-subset Scilab" xml:id="SampleMainStream" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>$LastChangedDate: 2010-10-24 12:00:00 +0100 (Thu., OCtober 24, 2013)
    $</pubdate>
  </info>

  <refnamediv>
    <refname>SampleMainStream</refname>

    <refpurpose>Samples tributaries along the mainstream of a catchment.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>[ C , W ] = SampleMainStream ( handle_tree ) </synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Arguments</title>
    <variablelist>

      <varlistentry>
      <term>tree</term>
        <listitem>
          <para>
	  integer: handle of the cell tree defining the catchment whose mainstream will be followed.</para>
	  </listitem>
      </varlistentry>
	  
	  <varlistentry>
      <term>C</term>
        <listitem>
          <para>
	  output: vector containing the outlet cells (record numbers) of all tributaries draining into the mainstream.</para>
	  </listitem>
      </varlistentry>
	 
	  <varlistentry>
      <term>W</term>
        <listitem>
          <para>
	  output : vector having the same size as <literal>C</literal>, giving the total upstream weight of the corresponding catchments. <literal>W(i)</literal> is the total upstream weight of the catchment above cell <literal>C(i)</literal>.</para>
	  </listitem>
      </varlistentry>
	  
</variablelist>
  </refsection>



  <refsection>
    <title>Description</title>

    <para>Samples tributaries along the mainstream of a catchment.</para>

  </refsection>

  <refsection>
    <title>Examples</title>
  </refsection>
 
   <refsection><title>See Also</title><simplelist type='inline'>
    
      <member> 
         <link linkend='CreateCellTree'>CreateCellTree</link>, <link linkend='XY2rec'>XY2rec</link>
      </member>
     
   </simplelist></refsection>


  <refsection>
    <title>Authors</title>

    <simplelist type="vert">
      <member>Nicolas LE MOINE</member>
    </simplelist>
  </refsection>
</refentry>
