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

« back to all changes in this revision

Viewing changes to man/eng/mtlb/mtlb_find.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>mtlb_find</TITLE>
 
6
  <TYPE>M2SCI function</TYPE>
 
7
  <DATE>April 2004</DATE>
 
8
 
 
9
  <SHORT_DESCRIPTION name="mtlb_find">Matlab find emulation function</SHORT_DESCRIPTION>
 
10
 
 
11
  <DESCRIPTION>
 
12
 
 
13
    <P>Matlab and Scilab <VERB>find</VERB> behave differently in some particular cases:</P>
 
14
 
 
15
    <DESCRIPTION_INDENT>
 
16
    <DESCRIPTION_ITEM>
 
17
    <ITEMIZE>
 
18
      <ITEM>
 
19
        <SP>
 
20
        With column vectors and matrices as input: Matlab <VERB>find</VERB> returns column
 
21
        vectors while Scilab returns row vectors.
 
22
        </SP>
 
23
      </ITEM>
 
24
 
 
25
      <ITEM>
 
26
        <SP>
 
27
        When called with three outputs: Matlab <VERB>find</VERB> can have three outputs but Scilab not.
 
28
        </SP>
 
29
      </ITEM>
 
30
    </ITEMIZE>
 
31
    </DESCRIPTION_ITEM>
 
32
    </DESCRIPTION_INDENT>
 
33
 
 
34
    <P>
 
35
    The function <VERB>[i[,j[,v]]] = mtlb_find(B)</VERB> is used by
 
36
    <VERB>mfile2sci</VERB> to replace <VERB>[i[,j[,v]]] = find(B)</VERB> when it was not
 
37
    possible to know what was the input while porting Matlab code to Scilab. This function will
 
38
    determine the correct semantic at run time. If you want to have a
 
39
    more efficient code it is possible to replace <VERB>mtlb_find</VERB> calls:
 
40
    </P>
 
41
 
 
42
    <DESCRIPTION_INDENT>
 
43
    <DESCRIPTION_ITEM>
 
44
    <ITEMIZE>
 
45
      <ITEM>
 
46
        <SP>
 
47
        When called with one output, if <VERB>B</VERB> is a row vector 
 
48
        <VERB>i = mtlb_find(B)</VERB> may be replaced by <VERB>i = find(B)</VERB>
 
49
        </SP>
 
50
      </ITEM>
 
51
 
 
52
      <ITEM>
 
53
        <SP>
 
54
        When called with one output, if <VERB>B</VERB> is not a row vector 
 
55
        <VERB>i = mtlb_find(B)</VERB> may be replaced by <VERB>i = matrix(find(B),-1,1)</VERB>
 
56
        </SP>
 
57
      </ITEM>
 
58
 
 
59
      <ITEM>
 
60
        <SP>
 
61
        When called with two outputs, if <VERB>B</VERB> is a row vector 
 
62
        <VERB>[i,j] = mtlb_find(B)</VERB> may be replaced by <VERB>[i,j] = find(B)</VERB>
 
63
        </SP>
 
64
      </ITEM>
 
65
 
 
66
      <ITEM>
 
67
        <SP>
 
68
        When called with two outputs, if <VERB>B</VERB> is not a row vector 
 
69
        <VERB>[i,j] = mtlb_find(B)</VERB> may be replaced by
 
70
        <VERB>[i,j] = find(B);i = matrix(i,-1,1);j = matrix(j,-1,1);</VERB>
 
71
        </SP>
 
72
      </ITEM>
 
73
    </ITEMIZE>
 
74
    </DESCRIPTION_ITEM>
 
75
    </DESCRIPTION_INDENT>
 
76
 
 
77
    <P>Caution: <VERB>mtlb_find</VERB> has not to be used for hand coded functions.</P>
 
78
 
 
79
  </DESCRIPTION>
 
80
 
 
81
  <AUTHORS>
 
82
    <AUTHORS_ITEM>V.C.</AUTHORS_ITEM>
 
83
  </AUTHORS>
 
84
</MAN>