13
13
<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" version="5.0-subset Scilab" xml:lang="en" xml:id="mtlb_sparse">
15
<refname>mtlb_sparse</refname>
16
<refpurpose> convert sparse matrix</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>Y=mtlb_sparse(X)</synopsis>
23
<title>Arguments</title>
28
<para>sparse matrix</para>
34
<para>sparse matrix in Matlab format</para>
40
<title>Description</title>
42
<literal>Y=mtlb_sparse(X)</literal> is used to convert <literal>X</literal>, a Scilab sparse matrix, to
43
Matlab format. <literal>Y</literal> is the a variable with type 7,
44
i.e. <literal>type(Y)</literal> is equal to 7.
45
This function should be used in mexfiles (a Matlab mexfile containing sparse
46
matrices can be used only if the Scilab sparse matrices are converted
47
to that format). The functions <literal>full</literal> and <literal>spget</literal> work
51
Other operations and functions using this format
52
can be overloaded with Scilab functions using the prefix "%msp".
53
For instance the function
54
<literal>%msp_p(x)</literal> (see SCI/modules/overloading/macros directory) is used to
55
display such "type 7" objects.
59
<title>Examples</title>
60
<programlisting role="example"><![CDATA[
15
<refname>mtlb_sparse</refname>
16
<refpurpose> convert sparse matrix</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>Y=mtlb_sparse(X)</synopsis>
23
<title>Arguments</title>
28
<para>sparse matrix</para>
34
<para>sparse matrix in Matlab format</para>
40
<title>Description</title>
42
<literal>Y=mtlb_sparse(X)</literal> is used to convert <literal>X</literal>, a Scilab sparse matrix, to
43
Matlab format. <literal>Y</literal> is the a variable with type 7,
44
i.e. <literal>type(Y)</literal> is equal to 7.
45
This function should be used in mexfiles (a Matlab mexfile containing sparse
46
matrices can be used only if the Scilab sparse matrices are converted
47
to that format). The functions <literal>full</literal> and <literal>spget</literal> work
51
Other operations and functions using this format
52
can be overloaded with Scilab functions using the prefix "%msp".
53
For instance the function
54
<literal>%msp_p(x)</literal> (see SCI/modules/overloading/macros directory) is used to
55
display such "type 7" objects.
59
<title>Examples</title>
60
<programlisting role="example"><![CDATA[
61
61
X=sparse(rand(2,2)); Y=mtlb_sparse(X);
62
62
Y, full(Y), [ij,v,mn]=spget(Y)
63
63
]]></programlisting>
65
<refsection role="see also">
66
<title>See Also</title>
67
<simplelist type="inline">
69
<link linkend="full">full</link>
72
<link linkend="spget">spget</link>
65
<refsection role="see also">
66
<title>See Also</title>
67
<simplelist type="inline">
69
<link linkend="full">full</link>
72
<link linkend="spget">spget</link>