}
/**
- * Retrieve the list of the elements which have an attribute equals to the given value.
+ * Retrieve the list of the elements which have an attribute equal to the given value.
* @param root the root element
* @param attribute the attribute name
* @param value the value
}
/**
- * Retrieve the list of the elements which have an attribute equals to the given value (recursive function).
+ * Retrieve the list of the elements which have an attribute equal to the given value (recursive function).
* @param root the root element
* @param attribute the attribute name
* @param value the value
To run the demo (assuming that your working directory is SCIDIR/demos/wheel2);
1: If necessary, compile the Fortran routines (this is done by the Makefile)
in SCIDIR/demos/wheel2.
-2: run the "ex" file ("exec(ex)") in Scilab (change the values in the fist
+2: run the "ex" file ("exec(ex)") in Scilab (change the values in the first
line of this file for changing initial conditions (uncomment)).
exec(sci+'/demos/wheel2/ex')
3. Enter the command "show(x)" in Scilab for plotting the wheel.
-Also you can use the macro wheel (file "wheel.sci") to compute x and
+Also you can use the macro wheel (file "wheel.sci") to compute x and
plot the results by the macro show (file "wheel_show.sci").
The fortran files (bigmat.f, constr.f, inigrd.f) are automatically
The class must be in the classpath (to add a package or a directory in the Java classpath, just use <link type="scilab" linkend="scilab.help/javaclasspath">javaclasspath</link>).
</para>
<para>
- When <literal>jimport("java.lang.String")</literal>, a mlist named String is created on the Scilab stack. The created mlist has a type equals to _JClass and can be used to instantiate new objects in using something like <literal>str = String.new("A Scilab String");</literal>. It is possible to call the static methods (if exist) of the class
+ When <literal>jimport("java.lang.String")</literal>, a mlist named String is created on the Scilab stack. The created mlist has a type equal to _JClass and can be used to instantiate new objects in using something like <literal>str = String.new("A Scilab String");</literal>. It is possible to call the static methods (if exist) of the class
</para>
<programlisting role="example"><![CDATA[
jimport java.lang.Math;
</revhistory>
</refsection>
</refentry>
-
Object convert(Object original, Class<?> to);
/**
- * Check if the converter is able to convert an object with class equals to from to an object with class to
+ * Check if the converter is able to convert an object with class equal to 'from' to an object with class 'to'
* @param from the base class
* @param to the destination class
* @return true if the converter is able to convert
* So the square of the distance between two Class array is defined as the sum of the square of the distance between
* Class elements.
* In the particular case where a int.class is required and the argument is double.class, if the double value is an integer
- * the argument is converted into an int. In this case, dist(int.class, double.class) is equals to 2048. This value has been
+ * the argument is converted into an int. In this case, dist(int.class, double.class) is equal to 2048. This value has been
* choosed to be "sure" that another method with double.class will be considered better than the previous one.
* If the method has variable arguments foo(A a, B b, Object...), the Java reflection only shows that Class arguments are
* A.class, B.class and Object[].class. So such a method will give a very high distance (more than 2^40).
</para>
<para>
If <literal>functionname</literal> is the name of a undefined scilab function
- <literal>edit(functionname)</literal> create a <literal>functionname.sci</literal> file in
+ <literal>edit(functionname)</literal> create a <literal>functionname.sci</literal> file in
the current directory.
</para>
<para>
If <literal>functionname</literal> is not a valid macro or function name
- <literal>edit(functionname)</literal> opens the file with file name equals to
+ <literal>edit(functionname)</literal> opens the file with file name equal to
<literal>functionname</literal>.
</para>
<para>
</refsection>
<refsection>
<title>Examples</title>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
//open editor with text of this function
-edit('edit')
+edit('edit')
//open editor for a new function
-edit('myfunction')
+edit('myfunction')
//open the file bar.sci in TMPDIR directory
-edit(fullfile(TMPDIR+'bar.sci'))
+edit(fullfile(TMPDIR+'bar.sci'))
// open the file test_run.sci at line 123
// relatively to the definition of test_run()
-edit('test_run', 123)
+edit('test_run', 123)
]]></programlisting>
</refsection>
<refsection role="see also">
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) INRIA - Fabrice Leray
- *
+ *
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at
+ * are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
-->
<para>
this field defines a [<literal>m</literal>x<literal>n</literal>]
<literal>color</literal> data matrix (double, (u)int8, (u)int16, (u)int32) or hypermatrix.
- The colors are interpreted according to the image_type property.
- The color associated to <literal>color(i,j)</literal> is used do draw a small square
+ The colors are interpreted according to the image_type property.
+ The color associated to <literal>color(i,j)</literal> is used do draw a small square
of length 1 with center at location <literal>(x=j,y=(m-i+1))</literal>.
</para>
</listitem>
<listitem>
<para>
this field defines the image type. It could be one of the values: "rgb", "rgba", "gray", "index",
- "red", "green", "blue", "rgb332", "rgb444", "rgb555", "rgba5551".
+ "red", "green", "blue", "rgb332", "rgb444", "rgb555", "rgba5551".
+ </para>
+ <para>
+ Colors are determinated by the data type and by image_type:
</para>
- <para>
- Colors are determinated by the data type and by image_type:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- When image_type is equals to index, the data are just considered as an index in the colormap.
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgb, hypermat of int8 or uint8 will give the RGB components, hypermat of doubles will give normalized RGB components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 3 will give the RGB components, matrices of int32 will give RGB colors, matrices of uint32 will give RGBA colors where the alpha channel will be set to 0xFF.
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgba, hypermat of int8 or uint8 will give the RGBA components, hypermat of doubles will give normalized RGBA components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 4 will give the RGB components, matrices of int32 will give RGBA colors, matrices of uint32 will give RGBA colors.
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to gray, matrices of int8 or uint8 will give Gray level color (R-G-B=GRAY-GRAY-GRAY), for other types, data will be considered as RGB ones and converted into gray colors (0.299*R+0.587*G+0.114*B).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to red, matrices of int8 or uint8 will give Red level color (R-G-B=RED-00-00), for other types, data will be considered as RGB ones and converted into red colors (a mask is applied to keep the Red component).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to green, matrices of int8 or uint8 will give Green level color (R-G-B=00-GREEN-00), for other types, data will be considered as RGB ones and converted into green colors (a mask is applied to keep the Green component).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to blue, matrices of int8 or uint8 will give Blue level color (R-G-B=00-00-BLUE), for other types, data will be considered as RGB ones and converted into blue colors (a mask is applied to keep the Blue component).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgb332, matrices of int8 or uint8 will give RGB colors where R component is wrote on 3 bits, G component on 3 bits and B component on 2 bits. For other data types, RGB (8-8-8) data are converted into RGB (3-3-2).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgb444, matrices of int16 or uint16 will give RGB colors where each components is wrote on 4 bits. For other data types, RGB (8-8-8) data are converted into RGB (4-4-4).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgb555, matrices of int16 or uint16 will give RGB colors where each components is wrote on 5 bits. For other data types, RGB (8-8-8) data are converted into RGB (5-5-5).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgb4444, matrices of int16 or uint16 will give RGBA colors where each components is wrote on 4 bits. For other data types, RGBA (8-8-8-8) data are converted into RGBA (4-4-4-4).
- </para>
- </listitem>
- <listitem>
- <para>
- When image_type is equals to rgb5551, matrices of int16 or uint16 will give RGBA colors where each non-alpha components is wrote on 5 bits and the alpha component on 1 bit. For other data types, RGBA (8-8-8-8) data are converted into RGBA (5-5-5-1).
- </para>
- </listitem>
- </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ When image_type is equal to index, the data are just considered as an index in the colormap.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgb, hypermat of int8 or uint8 will give the RGB components, hypermat of doubles will give normalized RGB components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 3 will give the RGB components, matrices of int32 will give RGB colors, matrices of uint32 will give RGBA colors where the alpha channel will be set to 0xFF.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgba, hypermat of int8 or uint8 will give the RGBA components, hypermat of doubles will give normalized RGBA components (values between 0 and 1), matrices of int8 or uint8 where number of rows is a multiple of 4 will give the RGB components, matrices of int32 will give RGBA colors, matrices of uint32 will give RGBA colors.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to gray, matrices of int8 or uint8 will give Gray level color (R-G-B=GRAY-GRAY-GRAY), for other types, data will be considered as RGB ones and converted into gray colors (0.299*R+0.587*G+0.114*B).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to red, matrices of int8 or uint8 will give Red level color (R-G-B=RED-00-00), for other types, data will be considered as RGB ones and converted into red colors (a mask is applied to keep the Red component).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to green, matrices of int8 or uint8 will give Green level color (R-G-B=00-GREEN-00), for other types, data will be considered as RGB ones and converted into green colors (a mask is applied to keep the Green component).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to blue, matrices of int8 or uint8 will give Blue level color (R-G-B=00-00-BLUE), for other types, data will be considered as RGB ones and converted into blue colors (a mask is applied to keep the Blue component).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgb332, matrices of int8 or uint8 will give RGB colors where R component is wrote on 3 bits, G component on 3 bits and B component on 2 bits. For other data types, RGB (8-8-8) data are converted into RGB (3-3-2).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgb444, matrices of int16 or uint16 will give RGB colors where each components is wrote on 4 bits. For other data types, RGB (8-8-8) data are converted into RGB (4-4-4).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgb555, matrices of int16 or uint16 will give RGB colors where each components is wrote on 5 bits. For other data types, RGB (8-8-8) data are converted into RGB (5-5-5).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgb4444, matrices of int16 or uint16 will give RGBA colors where each components is wrote on 4 bits. For other data types, RGBA (8-8-8-8) data are converted into RGBA (4-4-4-4).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When image_type is equal to rgb5551, matrices of int16 or uint16 will give RGBA colors where each non-alpha components is wrote on 5 bits and the alpha component on 1 bit. For other data types, RGBA (8-8-8-8) data are converted into RGBA (5-5-5-1).
+ </para>
+ </listitem>
+ </itemizedlist>
</listitem>
</varlistentry>
<varlistentry>
<term>user_data: </term>
<listitem>
<para>
- this field can be use to store any scilab variable in the
+ this field can be use to store any scilab variable in the
<literal>Matplot</literal> data structure, and to retreive it.
</para>
</listitem>
</refsection>
<refsection>
<title>Examples</title>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
Matplot((1:xget("lastpattern")))
e=gce(); // get current entity
e.data=e.data($:-1:1) // reverse order
]]></programlisting>
-<scilab:image>
-Matplot((1:xget("lastpattern")));
-e=gce();
-e.data=e.data($:-1:1);
-</scilab:image>
+ <scilab:image>
+ Matplot((1:xget("lastpattern")));
+ e=gce();
+ e.data=e.data($:-1:1);
+ </scilab:image>
</refsection>
<refsection role="see also">
<title>See Also</title>
}
/**
- * Check if there is a window which has a dockableID equals to the given uuid
+ * Check if there is a window which has a dockableID equal to the given uuid
* @param winuuid the uuid of the window
* @param uuid the uuid to test
* @return true if a dockableId exists
</imageobject>
</inlinemediaobject>
</para>
- <para>The arguments start, count, stride and block must have a size equals to the number of dimensions of the data:
+ <para>The arguments start, count, stride and block must have a size equal to the number of dimensions of the data:
<simplelist type="inline">
<member>
- start: gives the coordinates in the data where to start the selection.
+ start: gives the coordinates in the data where to start the selection.
</member>
<member>
- count: gives the number of selected blocks in each dimension.
+ count: gives the number of selected blocks in each dimension.
</member>
<member>
- stride: gives the shift between two consecutives blocks in each dimension. Take care that the stride must be greater than the corresponding block dimension.
+ stride: gives the shift between two consecutives blocks in each dimension. Take care that the stride must be greater than the corresponding block dimension.
</member>
<member>
- block: gives the block dimensions.
+ block: gives the block dimensions.
</member>
</simplelist>
</para>
<title>Examples</title>
<programlisting role="example"><![CDATA[
x = int8(matrix(1:80, 10, 8));
-save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones
+save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones
// Open the created file
a = h5open(TMPDIR + "/x.sod");
</imageobject>
</inlinemediaobject>
</para>
- <para>The arguments start, count, stride and block must have a size equals to the number of dimensions of the data:
+ <para>The arguments start, count, stride and block must have a size equal to the number of dimensions of the data:
<simplelist type="inline">
<member>
- start: gives the coordinates in the data where to start the selection.
+ start: gives the coordinates in the data where to start the selection.
</member>
<member>
- count: gives the number of selected blocks in each dimension.
+ count: gives the number of selected blocks in each dimension.
</member>
<member>
- stride: gives the shift between two consecutives blocks in each dimension. Take care that the stride must be greater than the corresponding block dimension.
+ stride: gives the shift between two consecutives blocks in each dimension. Take care that the stride must be greater than the corresponding block dimension.
</member>
<member>
- block: gives the block dimensions.
+ block: gives the block dimensions.
</member>
</simplelist>
By default stride and block are set to 1 in each dimension.
<title>Examples</title>
<programlisting role="example"><![CDATA[
x = matrix(1:20, 4, 5);
-save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones
+save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones
// Open the created file
a = h5open(TMPDIR + "/x.sod");
if (getWarningMode())
{
sciprint(_("%s: Feature %s is obsolete.\n"), _("Warning"), "load(file_descriptor)");
- sciprint(_("%s: See help('load') for the rational.\n"), _("Warning"));
+ sciprint(_("%s: See help('load') for the rationale.\n"), _("Warning"));
sciprint(_("%s: This feature will be permanently removed in Scilab %s\n\n"), _("Warning"), "6.0.0");
}
C2F(intload)(&Val, &k1);
"ind" parameter.
</para>
<para>At the beginning, Scilab calls the objective function, with the ind
- parameter equals to 10. This tells the objective function to initialize
+ parameter equal to 10. This tells the objective function to initialize
the sizes of the arrays it needs by setting the nizs, nrzs and ndzs
integer parameters of the "nird" common. Then the objective function
returns. At this point, Scilab creates internal variables and allocate
memory for the variable izs, rzs and dzs. Scilab calls the objective
- function back again, this time with ind equals to 11. This tells the
+ function back again, this time with ind equal to 11. This tells the
objective function to initialize the arrays izs, rzs and dzs. When the
objective function has done so, it returns. Then Scilab enters in the real
optimization mode and calls the optimization solver the user requested.
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) XXXX-2008 - INRIA
- *
+ *
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at
+ * are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
-->
<literal>function.</literal>If A is a function, it must
have the following header :
</para>
- <programlisting role=""><![CDATA[
+ <programlisting role=""><![CDATA[
function y = A ( x )
]]></programlisting>
</listitem>
<varlistentry>
<term>tol</term>
<listitem>
- <para>error relative tolerance (default: 1e-8).
+ <para>error relative tolerance (default: 1e-8).
The termination criteria is based on the 2-norm of the
residual r=b-Ax, divided by the 2-norm of the right hand side b.
</para>
problems
</title>
<para>In the following example, two linear systems are solved. The first
- maxtrix has a condition number equals to ~0.02, which makes the algorithm
+ maxtrix has a condition number equal to ~0.02, which makes the algorithm
converge in exactly 10 iterations. Since this is the size of the matrix,
it is an expected behaviour for a gradient conjugate method. The second
- one has a low condition number equals to 1.d-6, which makes the algorithm
+ one has a low condition number equal to 1.d-6, which makes the algorithm
converge in a larger 22 iterations. This is why the parameter maxIter is
- set to 30. See below for other examples of the "key=value" syntax.
+ set to 30. See below for other examples of the "key=value" syntax.
</para>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
//Well conditionned problem
-A=[ 94 0 0 0 0 28 0 0 32 0
- 0 59 13 5 0 0 0 10 0 0
- 0 13 72 34 2 0 0 0 0 65
- 0 5 34 114 0 0 0 0 0 55
- 0 0 2 0 70 0 28 32 12 0
- 28 0 0 0 0 87 20 0 33 0
- 0 0 0 0 28 20 71 39 0 0
- 0 10 0 0 32 0 39 46 8 0
- 32 0 0 0 12 33 0 8 82 11
+A=[ 94 0 0 0 0 28 0 0 32 0
+ 0 59 13 5 0 0 0 10 0 0
+ 0 13 72 34 2 0 0 0 0 65
+ 0 5 34 114 0 0 0 0 0 55
+ 0 0 2 0 70 0 28 32 12 0
+ 28 0 0 0 0 87 20 0 33 0
+ 0 0 0 0 28 20 71 39 0 0
+ 0 10 0 0 32 0 39 46 8 0
+ 32 0 0 0 12 33 0 8 82 11
0 0 65 55 0 0 0 0 11 100];
b=ones(10,1);
//Ill contionned one
A=[ 894 0 0 0 0 28 0 0 1000 70000
- 0 5 13 5 0 0 0 0 0 0
- 0 13 72 34 0 0 0 0 0 6500
- 0 5 34 1 0 0 0 0 0 55
- 0 0 0 0 70 0 28 32 12 0
- 28 0 0 0 0 87 20 0 33 0
- 0 0 0 0 28 20 71 39 0 0
- 0 0 0 0 32 0 39 46 8 0
- 1000 0 0 0 12 33 0 8 82 11
+ 0 5 13 5 0 0 0 0 0 0
+ 0 13 72 34 0 0 0 0 0 6500
+ 0 5 34 1 0 0 0 0 0 55
+ 0 0 0 0 70 0 28 32 12 0
+ 28 0 0 0 0 87 20 0 33 0
+ 0 0 0 0 28 20 71 39 0 0
+ 0 0 0 0 32 0 39 46 8 0
+ 1000 0 0 0 12 33 0 8 82 11
70000 0 6500 55 0 0 0 0 11 100];
-
+
[x, fail, err, iter, res]=pcg(A,b,maxIter=30,tol=1d-12);
mprintf(" fail=%d, iter=%d, errrel=%e\n",fail,iter,err)
]]></programlisting>
right-hand side, is given to the "pcg" primitive. The final case shown by
this example, is when a list is passed to the primitive.
</para>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
//Well conditionned problem
-A=[ 94 0 0 0 0 28 0 0 32 0
- 0 59 13 5 0 0 0 10 0 0
- 0 13 72 34 2 0 0 0 0 65
- 0 5 34 114 0 0 0 0 0 55
- 0 0 2 0 70 0 28 32 12 0
- 28 0 0 0 0 87 20 0 33 0
- 0 0 0 0 28 20 71 39 0 0
- 0 10 0 0 32 0 39 46 8 0
- 32 0 0 0 12 33 0 8 82 11
+A=[ 94 0 0 0 0 28 0 0 32 0
+ 0 59 13 5 0 0 0 10 0 0
+ 0 13 72 34 2 0 0 0 0 65
+ 0 5 34 114 0 0 0 0 0 55
+ 0 0 2 0 70 0 28 32 12 0
+ 28 0 0 0 0 87 20 0 33 0
+ 0 0 0 0 28 20 71 39 0 0
+ 0 10 0 0 32 0 39 46 8 0
+ 32 0 0 0 12 33 0 8 82 11
0 0 65 55 0 0 0 0 11 100];
b=ones(10,1);
// Define a function which computes the right-hand side.
function y=Atimesx(x)
- A=[ 94 0 0 0 0 28 0 0 32 0
- 0 59 13 5 0 0 0 10 0 0
+ A=[ 94 0 0 0 0 28 0 0 32 0
+ 0 59 13 5 0 0 0 10 0 0
0 13 72 34 2 0 0 0 0 65
0 5 34 114 0 0 0 0 0 55
0 0 2 0 70 0 28 32 12 0
Without the "key=value" syntax, the positionnal arguments would require
that maxIter come first and verbose after.
</para>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
// Example of an argument passed with key=value syntax
A=[100,1;1,10];
b=[101;11];
<revision>
<revnumber>5.4.0</revnumber>
<revremark>
- <link linkend="csvRead">csvWrite</link> provide a better replacement of write_csv.
+ <link linkend="csvWrite">csvWrite</link> provide a better replacement of write_csv.
</revremark>
</revision>
</revhistory>
</refsection>
</refentry>
-
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2000 - INRIA - Carlos Klimann
- *
+ *
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at
+ * are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
-->
</para>
<para>
For a vector or matrix <literal> x</literal>, <literal>
- m=trimmean(x,discard)
+ m=trimmean(x,discard)
</literal>
returns in scalar<literal> m</literal>
the trimmed mean of all the entries of <literal> x</literal>.
</para>
<para>
<literal> m=trimmean(x,'r') </literal> (or, equivalently, <literal>
- m=trimmean(x,1)
+ m=trimmean(x,1)
</literal>
)returns in each entry of the row vector
<literal> m</literal> the trimmed mean of each column of <literal>
</para>
<para>
<literal> m=trimmean(x,'c') </literal> (or, equivalently, <literal>
- m=trimmean(x,2)
+ m=trimmean(x,2)
</literal>
)returns in each entry of the column vector
<literal> m</literal> the trimmed mean of each row of <literal>
<refsection>
<title>Example with x as vector</title>
<para>In the following example, one computes the trimmed mean of one data
- vector, with the default discard value equals to 50 and verbose logging.
+ vector, with the default discard value equal to 50 and verbose logging.
The data is made of 9 entries. The algorithms sorts the vector and keeps
only indices from 3 to 7, skipping indices 1, 2, 8 and 9. The value 4000,
which is much larger than the others is not taken into account. The
computed trimmed mean is therefore 50.
</para>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
data = [10, 20, 30, 40, 50, 60, 70, 80, 4000];
computed = trimmean(data,verbose=1);
]]></programlisting>
one computes a trimmed mean. The trimmed mean is the line vector [25 25 25
25].
</para>
- <programlisting role="example"><![CDATA[
+ <programlisting role="example"><![CDATA[
data = [10 10 10 10
20 20 20 20
30 30 30 30
elseif orien=="r"|orien==1 then
m=sqrt(sum((x-ones(x(:,1))*mean(x,orien)).^2,orien)/size(x,orien));
else
- error(msprintf(gettext("%s: Wrong value for input argument #%d: ''%s'', ''%s'', %d or %d expected.\n"),"stdevf",2,"r","c",1,2)),
+ error(msprintf(gettext("%s: Wrong value for input argument #%d: ''%s'', ''%s'', %d or %d expected.\n"),"msd",2,"r","c",1,2)),
end
endfunction
}
/**
- * Check if all the values are equals to the default one.
+ * Check if all the values are equal to the default one.
*/
if (!hasDefaultValue(ports)) {
return;
}
/**
- * When all values are equals to the default one, set it to the block
+ * When all values are equal to the default one, set it to the block
* and hide the children.
*/
source.setValue(NOT_PRINTED_LABEL);
}
/**
- * Check if all the values are equals to the default one.
+ * Check if all the values are equal to the default one.
*/
if (!hasDefaultValue(ports)) {
return;
}
/**
- * When all values are equals to the default one, set it to the block
+ * When all values are equal to the default one, set it to the block
* and hide the children.
*/
source.setValue(NOT_PRINTED_LABEL);
.gettext("Generate Jacobian");
public static final String ERROR = Messages.gettext("Error");
public static final String UNKNOWNS_NEQ_EQUATIONS = Messages
- .gettext("Unknowns not equals to Equations");
+ .gettext("Unknowns not equal to Equations");
public static final String UNKNOWNS = Messages.gettext("Unknowns");
public static final String REDUCED = Messages.gettext("Reduced");
public static final String EXTENDED = Messages.gettext("Extended");
}
/*
- * The latest value must be equals to the previous one or to the
+ * The latest value must be equal to the previous one or to the
* type's default value
*/
final Object o;
}
/*
- * The latest value must be equals to the previous one or to the
+ * The latest value must be equal to the previous one or to the
* type's default value
*/
final Object o;
<programlisting role="example"><![CDATA[
doc = xmlReadStr("<root><a>12</a><a>13</a><a>1.2345678</a><a>45e3</a><a>.23E-2</a></root>");
- // Retrieve the content of the nodes with name equals to "a"
+ // Retrieve the content of the nodes with name equal to "a"
xp = xmlXPath(doc, "//a/text()");
// convert the result into doubles
<programlisting role="example"><![CDATA[
doc = xmlReadStr("<root><a>Hello</a><a>Scilab</a><a>World</a></root>");
- // Retrieve the content of the nodes with name equals to "a"
+ // Retrieve the content of the nodes with name equal to "a"
xp = xmlXPath(doc, "//a/text()");
// convert the result into a row of strings
<programlisting role="example"><![CDATA[
doc = xmlRead("http://www.w3.org/TR/2009/REC-xml-names-20091208/xml-names-10-3e.xml");
- // Retrieve the nodes with name equals to "note"
+ // Retrieve the nodes with name equal to "note"
xp = xmlXPath(doc, "//note");
s = size(xp);
for i=1:s(2)
xmlDump(xp(i))
end
- // Count the nodes with name equals to "note"
+ // Count the nodes with name equal to "note"
xp = xmlXPath(doc, "count(//note)")
// Retrieve the node with id="Philosophy"
xmlDump(xp(1))
end
- // Retrieve the nodes with an attribute num equals to the number 5
+ // Retrieve the nodes with an attribute num equal to the number 5
xp = xmlXPath(doc, "//*[number(@num)=5]");
s = size(xp);
if (s(2) <> 0) then