summaryrefslogtreecommitdiffstats
path: root/scilab/modules/elementary_functions/help/en_US/elementarymatrices/linspace.xml
blob: 032026e293774065fec97af9da5df62b426d6941 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="linspace" xml:lang="en">
    <refnamediv>
        <refname>linspace</refname>
        <refpurpose>linearly spaced vector</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>[v]=linspace(x1,x2 [,n])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>x1,x2</term>
                <listitem>
                    <para>real or complex scalars or column vectors</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>n</term>
                <listitem>
                    <para>integer: number of requested values. It must be greater or equal to 2 (default value = 100)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>v</term>
                <listitem>
                    <para>real or complex row vector</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Linearly spaced vector. <literal>linspace(x1, x2)</literal>
            generates a row vector of n (default value=100) linearly equally spaced
            points between <literal>x1</literal> and <literal>x2</literal>. If
            <literal>x1</literal> or <literal>x2</literal> are complex then
            <literal>linspace(x1,x2)</literal> returns a row vector of n complexes,
            the real (resp. imaginary) parts of the n complexes are linearly equally
            spaced between the real (resp. imaginary) parts of <literal>x1</literal>
            and <literal>x2.</literal>
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
linspace(1,2,10)
linspace([1:4]',[5:8]',10)
linspace(1+%i,2+2*%i,10)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="logspace">logspace</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.4.0</revnumber>
                <revremark>
                    <itemizedlist>
                        <listitem>The linspace function accepts column vectors as input argument for the two first input arguments. Thanks to Guillaume AZEMA for the implementation.
                        </listitem>
                        <listitem>The third input argument (n) must be an integer value.
                        </listitem>
                    </itemizedlist>
                </revremark>
            </revision>
        </revhistory>
    </refsection>
</refentry>