~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/eng/mtlb/sci_files.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<MAN>
 
4
  <LANGUAGE>eng</LANGUAGE>
 
5
  <TITLE>sci_files</TITLE>
 
6
  <TYPE>Documentation</TYPE>
 
7
  <DATE>March 2004</DATE>
 
8
 
 
9
  <SHORT_DESCRIPTION name="sci_files">How to write conversion functions</SHORT_DESCRIPTION>
 
10
 
 
11
  <DESCRIPTION>
 
12
  <P>  
 
13
  To convert calls to Matlab functions, <VERB>mfile2sci</VERB> uses a function called
 
14
  <VERB>sci_&lt;Matlab_function_name&gt;</VERB>. All these functions are defined in <TT>sci_files</TT>
 
15
  in directory SCI/macros/m2sci/sci_files/. The set of <TT>sci_files</TT> given in Scilab
 
16
  distribution does not allow to convert calls to all Matlab functions yet.
 
17
  However, a Scilab user can add <TT>sci_files</TT> (for Matlab functions or for user defined functions)
 
18
  to Scilab using the following tips. 
 
19
  </P>
 
20
 
 
21
  <P>
 
22
  In M2SCI, a function call is considered as a "tree" (it is also the case for the instructions
 
23
  of the file to convert), represented in Scilab by a <VERB>tlist</VERB> with following fields:
 
24
  </P>
 
25
  
 
26
  <DESCRIPTION_INDENT>
 
27
  <DESCRIPTION_ITEM>
 
28
    <ITEMIZE>
 
29
      <ITEM label="name">
 
30
      <SP>: Matlab function name</SP>
 
31
      </ITEM>
 
32
      <ITEM label="lhsnb">
 
33
      <SP>: number of Matlab function output parameters</SP>
 
34
      </ITEM>
 
35
      <ITEM label="lhs">
 
36
      <SP>: list of Matlab function output parameters</SP>
 
37
      </ITEM>
 
38
      <ITEM label="rhs">
 
39
      <SP>: list of Matlab function input parameters</SP>
 
40
      </ITEM>
 
41
    </ITEMIZE>
 
42
  </DESCRIPTION_ITEM>
 
43
  </DESCRIPTION_INDENT>
 
44
  
 
45
  <P>
 
46
  A <TT>sci_function</TT> has one input called <VERB>tree</VERB> which is also the output of the function.
 
47
  A <TT>sci_function</TT> has to convert this incoming "tree" so that it is compatible with Scilab
 
48
  by changing name, lhsnb, lhs and/or rhs. The other task that has to be done by this function
 
49
  is inference. Incoming tree contains inference data in its lhs that have to be updated with what
 
50
  can be infered for the outputs of this function. 
 
51
  </P>
 
52
 
 
53
  <P>
 
54
  Some useful functions have been written to help to write this conversion function:
 
55
  </P>
 
56
 
 
57
  <DESCRIPTION_INDENT>
 
58
  <DESCRIPTION_ITEM>
 
59
    <ITEMIZE>
 
60
      <ITEM label="Funcall">
 
61
      <SP>: create a tree representing a function call</SP>
 
62
      </ITEM>
 
63
      <ITEM label="Operation">
 
64
      <SP>: create a tree representing an operation</SP>
 
65
      </ITEM>
 
66
      <ITEM label="Variable">
 
67
      <SP>: create a tree representing a variable</SP>
 
68
      </ITEM>
 
69
      <ITEM label="Cste">
 
70
      <SP>: create a tree representing a constante value</SP>
 
71
      </ITEM>
 
72
      <ITEM label="Infer">
 
73
      <SP>: create a tree representing inference data</SP>
 
74
      </ITEM>
 
75
      <ITEM label="Type">
 
76
      <SP>: create a tree representing type for inference</SP>
 
77
      </ITEM>
 
78
      <ITEM label="Equal">
 
79
      <SP>: create a tree representing an instruction</SP>
 
80
      </ITEM>
 
81
    </ITEMIZE>
 
82
  </DESCRIPTION_ITEM>
 
83
  </DESCRIPTION_INDENT>
 
84
 
 
85
  <P>
 
86
  To have more informations about how to write such files, refer to directory
 
87
  SCI/macros/m2sci/sci_files/ which gives many examples from very simple ones
 
88
  (e.g. sci_abs.sci) to very complex ones (e.g. sci_zeros.sci).
 
89
  </P>
 
90
 
 
91
  </DESCRIPTION> 
 
92
 
 
93
  <SEE_ALSO>
 
94
    <SEE_ALSO_ITEM> <LINK>m2scideclare</LINK> </SEE_ALSO_ITEM>
 
95
    <SEE_ALSO_ITEM> <LINK>Funcall</LINK> </SEE_ALSO_ITEM>
 
96
    <SEE_ALSO_ITEM> <LINK>Operation</LINK> </SEE_ALSO_ITEM>
 
97
    <SEE_ALSO_ITEM> <LINK>Variable</LINK> </SEE_ALSO_ITEM>
 
98
    <SEE_ALSO_ITEM> <LINK>Cste</LINK> </SEE_ALSO_ITEM>
 
99
    <SEE_ALSO_ITEM> <LINK>Infer</LINK> </SEE_ALSO_ITEM>
 
100
    <SEE_ALSO_ITEM> <LINK>Type</LINK> </SEE_ALSO_ITEM>
 
101
    <SEE_ALSO_ITEM> <LINK>Equal</LINK> </SEE_ALSO_ITEM>
 
102
  </SEE_ALSO>
 
103
  
 
104
  <AUTHORS>
 
105
    <AUTHORS_ITEM>V.C.</AUTHORS_ITEM>
 
106
  </AUTHORS>
 
107
</MAN>