Add sample SOD and ZCOS icons files
[scilab.git] / scilab / modules / fileio / help / en_US / listvarinfile.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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="listvarinfile">
3     <refnamediv>
4         <refname>listvarinfile</refname>
5         <refpurpose>list of variables in a saved data file</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>listvarinfile(filename)
10             [names, typs, dims, vols] = listvarinfile(filename)
11         </synopsis>
12     </refsynopsisdiv>
13     <refsection>
14         <title>Arguments</title>
15         <variablelist>
16             <varlistentry>
17                 <term>filename</term>
18                 <listitem>
19                     <para>
20                         a character string, the pathname of the file to be inspected.
21                     </para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>nams</term>
26                 <listitem>
27                     <para>
28                         a matrix of strings, names of the variables saved in the file.
29                     </para>
30                 </listitem>
31             </varlistentry>
32             <varlistentry>
33                 <term>dims</term>
34                 <listitem>
35                     <para>
36                         a list, dimensions of the variables saved in the file.
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>typs</term>
42                 <listitem>
43                     <para>
44                         a numeric matrix, types of the variables saved in the file.
45                     </para>
46                 </listitem>
47             </varlistentry>
48             <varlistentry>
49                 <term>vols</term>
50                 <listitem>
51                     <para>
52                         a numeric matrix, size in bytes of the variables saved in the file.
53                     </para>
54                 </listitem>
55             </varlistentry>
56         </variablelist>
57     </refsection>
58     <refsection>
59         <title>Description</title>
60         <itemizedlist>
61             <listitem>
62                 <para>
63                     This utility function lists "a la <link linkend="whos">whos</link>" the variables contained in
64                     a Scilab data file produced by <link linkend="save">save</link>.
65                 </para>
66                 <para>
67                     <note>
68                         Hypermatrices are reported as plain mlists;
69                         rationals and state-spaces are reported as plain tlists;
70                         graphic handles are not recognized.
71                     </note>
72                 </para>
73             </listitem>
74         </itemizedlist>
75     </refsection>
76     <refsection>
77         <title>Examples</title>
78         <programlisting role="example"><![CDATA[ 
79 a=eye(2,2); b=int16(ones(a)); c=rand(2,3,3);
80 save(fullfile(TMPDIR,"vals.sod"),'a','b','c')
81 [names,typs,dims,vols] = listvarinfile(fullfile(TMPDIR,"vals.sod"))
82  ]]></programlisting>
83     </refsection>
84     <refsection role="see also">
85         <title>See Also</title>
86         <simplelist type="inline">
87             <member>
88                 <link linkend="whos">whos</link>
89             </member>
90             <member>
91                 <link linkend="save">save</link>
92             </member>
93             <member>
94                 <link linkend="load">load</link>
95             </member>
96             <member>
97                 <link linkend="save_format">save_format</link>
98             </member>
99             <member>
100                 <link linkend="type">type</link>
101             </member>
102         </simplelist>
103     </refsection>
104 </refentry>