Spaces:
Sleeping

XCos_MCP / data /help /Mathoperations_pal /SUMMATION.xml
xcos-bot
Deploy snapshot from 23aafd1a (verified archive)
39e01c4
Raw History Blame Contribute Delete
13.7 kB
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Scicos
*
* Copyright (C) INRIA - METALAU Project <scicos@inria.fr> (HTML version)
* Copyright (C) DIGITEO - Scilab Consortium (XML Docbook version)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* See the file ./license.txt
-->
<refentry 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"
xmlns:scilab="http://www.scilab.org" xml:id="SUMMATION" xml:lang="en_US">
<refnamediv>
<refname>SUMMATION</refname>
<refpurpose>Matrix Addition/Subtraction</refpurpose>
</refnamediv>
<refsection>
<title>Block Screenshot</title>
<inlinemediaobject>
<imageobject>
<imagedata align="center" fileref="../../../../images/palettes/SUMMATION.png"/>
</imageobject>
</inlinemediaobject>
</refsection>
<refsection id="Contents_SUMMATION">
<title>Contents</title>
<itemizedlist>
<listitem>
<xref linkend="Description_SUMMATION">Description</xref>
</listitem>
<listitem>
<xref linkend="Dialogbox_SUMMATION">Parameters</xref>
</listitem>
<listitem>
<xref linkend="Defaultproperties_SUMMATION">Default properties</xref>
</listitem>
<listitem>
<xref linkend="Interfacingfunction_SUMMATION">Interfacing function</xref>
</listitem>
<listitem>
<xref linkend="Computationalfunction_SUMMATION">Computational function</xref>
</listitem>
<listitem>
<xref linkend="Seealso_SUMMATION">See also</xref>
</listitem>
</itemizedlist>
</refsection>
<refsection id="Description_SUMMATION">
<title>Description</title>
<para>
This block performs addition or subtraction on scalar, vector or matrix inputs. The input datatype
is set with the <emphasis role="bold">Datatype</emphasis> parameter. The <emphasis role="bold">
Number of inputs or sign vector
</emphasis>
parameter defines the number of inputs and operation. For
a single vector's input the block collapse the elements of the vector. Vectors/matrices inputs
must have the same size.
</para>
<para>The behavior of the block is summarized in the following table :</para>
<informaltable border="1" cellpadding="2">
<tr>
<td align="left" width="18%">
<emphasis role="bold">Number of inputs</emphasis>
</td>
<td align="left" width="20%">
<emphasis role="bold">Operation</emphasis>
</td>
<td align="left">
<emphasis role="bold">Remarks</emphasis>
</td>
</tr>
<tr>
<td align="left">One</td>
<td align="left">y = (+/-)u</td>
<td align="left">
<emphasis>u</emphasis> is a scalar value and the block has the behavior of a unitary gain.
</td>
</tr>
<tr>
<td align="left">One</td>
<td align="left">y = u[1]+u[2]+...+u[N]</td>
<td align="left">
<emphasis>u</emphasis> is a vector or a matrix and the block output is the sum of the elements of the input
vector or matrix.
</td>
</tr>
<tr>
<td align="left">Two or more</td>
<td align="left">y = k[1]*u1+k[2]*u2+...+k[N]*uN</td>
<td align="left">
<emphasis>k</emphasis> is the scalar or vector value write in the <emphasis role="bold">
Number of inputs or sign vector
</emphasis>
parameter. For the addition of all inputs, simply set this
parameter to the number of inputs. To add/subtract the input <emphasis>ui</emphasis>, set in this
parameter a vector k with <emphasis>k[i]</emphasis> = +1 (addition) or -1 (subtraction)
for the input <emphasis>ui</emphasis>.
</td>
</tr>
</informaltable>
<para>With integer input, on overflow the result can take different forms:</para>
<para>
1- A normal non saturated result. By example, if type is int8 and the result 128, the block output
value will be -128.
</para>
<para>2- A saturated result. For the previous example the block output value will be 127.</para>
<para>3- An error message warning the user about the overflow.</para>
<para>
The user can select one of these three forms by setting the
<emphasis role="bold">Do on Overflow</emphasis> field to 0, 1 or 2.
</para>
</refsection>
<refsection id="Dialogbox_SUMMATION">
<title>Parameters</title>
<inlinemediaobject>
<imageobject>
<imagedata align="center" fileref="../../../../images/gui/SUMMATION_gui.gif" style="float:right"/>
<!-- align => Javahelp, style => Online -->
</imageobject>
</inlinemediaobject>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Datatype (1=real double 2=complex 3=int32 ...)</emphasis>
</para>
<para>
It indicates the type of the input/output data. It support all datatype, number must be between 1 and 8.
</para>
<para>Properties : Type 'vec' of size 1.</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Number of inputs or sign vector (of +1,-1)</emphasis>
</para>
<para>
It indicates the number of inputs and the operation see the description for more detail. If you set a value
other of -1 or +1, you get an error message box.
</para>
<para>Properties : Type 'vec' of size -1.</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Do on Overflow(0=Nothing 1=Saturate 2=Error)</emphasis>
</para>
<para>When this parameter is set to zero the result is similar to a
normal summation of two integer matrix. When it is set to 1, on
overflow the block saturate the result. When it is set to 2, on
overflow an error message box appears. If the Data type is double or
complex this parameter is not used.
</para>
<para>Properties : Type 'vec' of size 1.</para>
</listitem>
</itemizedlist>
</refsection>
<refsection id="Defaultproperties_SUMMATION">
<title>Default properties</title>
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">always active:</emphasis> no
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">direct-feedthrough:</emphasis> yes
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">zero-crossing:</emphasis> no
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">mode:</emphasis> no
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">regular inputs:</emphasis>
</para>
<para>
<emphasis role="bold">- port 1 : size [-1,-2] / type 1</emphasis>
</para>
<para>
<emphasis role="bold">- port 2 : size [-1,-2] / type 1</emphasis>
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">regular outputs:</emphasis>
</para>
<para>
<emphasis role="bold">- port 1 : size [-1,-2] / type 1</emphasis>
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">number/sizes of activation inputs:</emphasis> 0
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">number/sizes of activation outputs:</emphasis> 0
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">continuous-time state:</emphasis> no
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">discrete-time state:</emphasis> no
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">object discrete-time state:</emphasis> no
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">name of computational function:</emphasis>
<emphasis role="italic">summation</emphasis>
</para>
</listitem>
</itemizedlist>
<para/>
</refsection>
<refsection id="Interfacingfunction_SUMMATION">
<title>Interfacing function</title>
<itemizedlist>
<listitem>
<para>SCI/modules/scicos_blocks/macros/Linear/SUMMATION.sci</para>
</listitem>
</itemizedlist>
</refsection>
<refsection id="Computationalfunction_SUMMATION">
<title>Computational function</title>
<itemizedlist>
<listitem>
SCI/modules/scicos_blocks/src/c/summation.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_z.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i32n.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i16n.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i8n.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui32n.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui16n.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui8n.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i32s.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i16s.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i8s.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui32s.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui16s.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui8s.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i32e.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i16e.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_i8e.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui32e.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui16e.c
</listitem>
<listitem>
SCI/modules/scicos_blocks/src/c/summation_ui8e.c
</listitem>
</itemizedlist>
</refsection>
<refsection xml:id="Seealso_SUMMATION" role="see also">
<title>See also</title>
<simplelist type="inline">
<member>
<link linkend="BIGSOM_f">BIGSOM_f</link>
</member>
<member>
<link linkend="SUM_f">SUM_f</link>
</member>
</simplelist>
</refsection>
</refentry>