Bug #13285 fixed - There was no appropriate example of the syntax for scifunc_block_m GUI
[scilab.git] / scilab / modules / xcos / help / en_US / palettes / Userdefinedfunctions_pal / scifunc_block_m.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scicos
4  * 
5  * Copyright (C) INRIA - METALAU Project <scicos@inria.fr> (HTML version)
6  * Copyright (C) DIGITEO - Scilab Consortium (XML Docbook version)
7  * 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  * 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  * 
22  * See the file ./license.txt
23  -->
24 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="scifunc_block_m">
25     <refnamediv>
26         <refname>scifunc_block_m</refname>
27         <refpurpose>Scilab function block</refpurpose>
28     </refnamediv>
29     <refsection>
30         <title>Block Screenshot</title>
31         <para>
32             <inlinemediaobject>
33                 <imageobject>
34                     <imagedata fileref="../../../../images/palettes/scifunc_block_m.png" align="center" valign="middle"/>
35                 </imageobject>
36             </inlinemediaobject>
37         </para>
38     </refsection>
39     <refsection id="Contents_scifunc_block_m">
40         <title>Contents</title>
41         <itemizedlist>
42             <listitem>
43                 <para>
44                     <link linkend="scifunc_block_m">Scilab function block</link>
45                 </para>
46             </listitem>
47             <listitem>
48                 <itemizedlist>
49                     <listitem>
50                         <para>
51                             <xref linkend="Palette_scifunc_block_m">Palette</xref>
52                         </para>
53                     </listitem>
54                     <listitem>
55                         <para>
56                             <xref linkend="Description_scifunc_block_m">Description</xref>
57                         </para>
58                     </listitem>
59                     <listitem>
60                         <para>
61                             <xref linkend="Dialogbox_scifunc_block_m">Dialog box</xref>
62                         </para>
63                     </listitem>
64                     <listitem>
65                         <para>
66                             <xref linkend="Defaultproperties_scifunc_block_m">Default properties</xref>
67                         </para>
68                     </listitem>
69                     <listitem>
70                         <para>
71                             <xref linkend="Interfacingfunction_scifunc_block_m">Interfacing function</xref>
72                         </para>
73                     </listitem>
74                     <listitem>
75                         <para>
76                             <xref linkend="Computationalfunction_scifunc_block_m">Computational function</xref>
77                         </para>
78                     </listitem>
79                 </itemizedlist>
80             </listitem>
81         </itemizedlist>
82     </refsection>
83     <refsection id="Palette_scifunc_block_m">
84         <title>Palette</title>
85         <itemizedlist>
86             <listitem>
87                 <para>
88                     <link linkend="Userdefinedfunctions_pal">User defined functions palette</link>
89                 </para>
90             </listitem>
91         </itemizedlist>
92     </refsection>
93     <refsection id="Description_scifunc_block_m">
94         <title>Description</title>
95         <para>
96             This block can realize any type of Scicos block. The function of the
97             block is defined interactively using dialogue boxes and in Scilab
98             language. During simulation, these instructions are interpreted by
99             Scilab; the simulation of diagrams that include these types of blocks
100             is slower. For more information see Scicos reference manual.
101         </para>
102     </refsection>
103     <refsection id="Dialogbox_scifunc_block_m">
104         <title>Dialog box</title>
105         <para>
106             <inlinemediaobject>
107                 <imageobject>
108                     <imagedata fileref="../../../../images/gui/scifunc_block_m_gui.gif" align="center" valign="middle"/>
109                 </imageobject>
110             </inlinemediaobject>
111         </para>
112         <para>
113             
114         </para>
115         <itemizedlist>
116             <listitem>
117                 <para>
118                     <emphasis role="bold">input ports sizes</emphasis>
119                 </para>
120                 <para> a matrix. Number of regular input ports </para>
121                 <para> Properties : Type 'mat' of size [-1 2] </para>
122                 <para> Example : [1,1] for one input of size 1x1; [1,1;2,3] for two inputs of size 1x1 and 2x3 </para>      
123             </listitem>
124             <listitem>
125                 <para>
126                     <emphasis role="bold">output port sizes</emphasis>
127                 </para>
128                 <para> a matrix. Number of regular output ports </para>
129                 <para> Properties : Type 'mat' of size [-2 2] </para>
130                 <para> Example : [1,1] for one output of size 1x1; [1,1;2,3] for two outputs of size 1x1 and 2x3 </para>
131             </listitem>
132             <listitem>
133                 <para>
134                     <emphasis role="bold">input event ports sizes</emphasis>
135                 </para>
136                 <para> a column vector. Number of input event ports </para>
137                 <para> Properties : Type 'vec' of size -1 </para>
138                 <para> Example : [1] for one input event port; [1;1] for two input event ports </para>
139             </listitem>
140             <listitem>
141                 <para>
142                     <emphasis role="bold">output events ports sizes</emphasis>
143                 </para>
144                 <para> a column vector. Number of output event ports</para>
145                 <para> Properties : Type 'vec' of size -1 </para>
146                 <para> Example : [1] for one output event port; [1;1] for two output event ports </para>
147             </listitem>
148             <listitem>
149                 <para>
150                     <emphasis role="bold">initial continuous state</emphasis>
151                 </para>
152                 <para> a column vector. </para>
153                 <para> Properties : Type 'vec' of size -1 </para>
154                 <para> Example : [0;0] for two initial continuous states </para>
155             </listitem>
156             <listitem>
157                 <para>
158                     <emphasis role="bold">initial discrete state</emphasis>
159                 </para>
160                 <para> a column vector. </para>
161                 <para> Properties : Type 'vec' of size -1 </para>
162                 <para> Example : [0;0] for two initial discrete states </para>
163             </listitem>
164             <listitem>
165                 <para>
166                     <emphasis role="bold">System parameters vector</emphasis>
167                 </para>
168                 <para> a column vector. </para>
169                 <para> Properties : Type 'vec' of size -1 </para>
170                 <para> Example : [0.5;1.5;2.5] for three parameters </para>
171             </listitem>
172             <listitem>
173                 <para>
174                     <emphasis role="bold">initial firing vector </emphasis>
175                 </para>
176                 <para> a column vector. Size of this vector corresponds to the number of event outputs. The value of the i-th entry specifies the time of the preprogrammed event firing on the i-th output event port. If less than zero, no event is preprogrammed. </para>
177                 <para> Properties : Type 'vec' of size sum(Number of output event ports) </para>
178                 <para> Example : [1;2] 1 and 2 are the preprogrammed events firing that correspond to the first output event port and to the second output event port respectively </para>
179             </listitem>
180             <listitem>
181                 <para>
182                     <emphasis role="bold">is block always active </emphasis>
183                 </para>
184                 <para> Properties : Type 'vec' of size 1</para>
185                 <para> Example : 1 the block is always active; 0 the block is not always active </para>
186             </listitem>
187             <listitem>
188                 <para> Other dialogues are opened consecutively where the user may write Scilab code associated with the computations needed (block initialization, outputs, continuous and discrete state, output events date, block ending). </para>
189             </listitem>
190         </itemizedlist>
191     </refsection>
192     <refsection id="Defaultproperties_scifunc_block_m">
193         <title>Default properties</title>
194         <itemizedlist>
195             <listitem>
196                 <para>
197                     <emphasis role="bold">always active:</emphasis> no
198                 </para>
199             </listitem>
200             <listitem>
201                 <para>
202                     <emphasis role="bold">direct-feedthrough:</emphasis> yes
203                 </para>
204             </listitem>
205             <listitem>
206                 <para>
207                     <emphasis role="bold">zero-crossing:</emphasis> no
208                 </para>
209             </listitem>
210             <listitem>
211                 <para>
212                     <emphasis role="bold">mode:</emphasis> no
213                 </para>
214             </listitem>
215             <listitem>
216                 <para>
217                     <emphasis role="bold">regular inputs:</emphasis>
218                 </para>
219                 <para>
220                     <emphasis role="bold">- port 1 : size [1,1] / type 1</emphasis>
221                 </para>
222             </listitem>
223             <listitem>
224                 <para>
225                     <emphasis role="bold">regular outputs:</emphasis>
226                 </para>
227                 <para>
228                     <emphasis role="bold">- port 1 : size [1,1] / type 1</emphasis>
229                 </para>
230             </listitem>
231             <listitem>
232                 <para>
233                     <emphasis role="bold">number/sizes of activation inputs:</emphasis> 0
234                 </para>
235             </listitem>
236             <listitem>
237                 <para>
238                     <emphasis role="bold">number/sizes of activation outputs:</emphasis> 0
239                 </para>
240             </listitem>
241             <listitem>
242                 <para>
243                     <emphasis role="bold">continuous-time state:</emphasis> no
244                 </para>
245             </listitem>
246             <listitem>
247                 <para>
248                     <emphasis role="bold">discrete-time state:</emphasis> no
249                 </para>
250             </listitem>
251             <listitem>
252                 <para>
253                     <emphasis role="bold">object discrete-time state:</emphasis> no
254                 </para>
255             </listitem>
256             <listitem>
257                 <para>
258                     <emphasis role="bold">name of computational function:</emphasis>
259                     <emphasis role="italic">scifunc</emphasis>
260                 </para>
261             </listitem>
262         </itemizedlist>
263     </refsection>
264     <refsection id="Example_scifunc_block_m">
265         <title>Example</title>
266         <para>
267             <link type="scilab" linkend="scilab.xcos/xcos/examples/userdefinedfunctions_pal/en_US/scifunc_block_m_en_US.zcos">
268                 <inlinemediaobject>
269                     <imageobject>
270                         <imagedata fileref="../../../../examples/userdefinedfunctions_pal/en_US/scifunc_block_m_en_US.zcos" align="center" valign="middle"/>
271                     </imageobject>
272                 </inlinemediaobject>
273             </link>
274         </para>
275         <scilab:image><![CDATA[
276 importXcosDiagram(SCI + "/modules/xcos/examples/userdefinedfunctions_pal/en_US/scifunc_block_m_en_US.zcos");
277 xcos_simulate(scs_m, 4);
278 ]]></scilab:image>
279     </refsection>
280     <refsection id="Interfacingfunction_scifunc_block_m">
281         <title>Interfacing function</title>
282         <itemizedlist>
283             <listitem>
284                 <para> SCI/modules/scicos_blocks/macros/Misc/scifunc_block_m.sci</para>
285             </listitem>
286         </itemizedlist>
287     </refsection>
288     <refsection id="Computationalfunction_scifunc_block_m">
289         <title>Computational function</title>
290         <itemizedlist>
291             <listitem>
292                 <para> SCI/modules/scicos/src/fortran/scifunc.f (Type 3)</para>
293             </listitem>
294         </itemizedlist>
295     </refsection>
296 </refentry>