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

« back to all changes in this revision

Viewing changes to man/eng/elementary/eval_cshep2d.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>eval_cshep2d</TITLE>
 
6
  <TYPE>Scilab Function</TYPE>
 
7
  <DATE>February 2004</DATE>
 
8
  <SHORT_DESCRIPTION name="eval_cshep2d">bidimensional cubic shepard interpolation evaluation</SHORT_DESCRIPTION>
 
9
 
 
10
  <CALLING_SEQUENCE>
 
11
  <CALLING_SEQUENCE_ITEM>[zp [,dzpdx, dzpdy [,d2zpdxx,d2zpdxy,d2zpdyy]]] = eval_cshep2d(xp, yp, tl_coef)</CALLING_SEQUENCE_ITEM>
 
12
  </CALLING_SEQUENCE>
 
13
 
 
14
  <PARAM>
 
15
    <PARAM_INDENT>
 
16
     <PARAM_ITEM>
 
17
        <PARAM_NAME>xp, yp</PARAM_NAME>
 
18
        <PARAM_DESCRIPTION>
 
19
         <SP>: two real vectors (or matrices) of the same size</SP>
 
20
        </PARAM_DESCRIPTION> 
 
21
     </PARAM_ITEM>
 
22
     <PARAM_ITEM>
 
23
        <PARAM_NAME>tl_coef</PARAM_NAME>
 
24
        <PARAM_DESCRIPTION>
 
25
         <SP>: a tlist scilab structure (of type cshep2d) defining a cubic Shepard interpolation function
 
26
               (named <VERB>S</VERB> in the following)</SP>
 
27
        </PARAM_DESCRIPTION> 
 
28
     </PARAM_ITEM>
 
29
     <PARAM_ITEM>
 
30
        <PARAM_NAME>zp</PARAM_NAME>
 
31
        <PARAM_DESCRIPTION>
 
32
         <SP>: vector (or matrix) of the same size than <VERB>xp</VERB> and  <VERB>yp</VERB>, 
 
33
               evaluation of the interpolant <VERB>S</VERB> at these points</SP>
 
34
        </PARAM_DESCRIPTION> 
 
35
     </PARAM_ITEM>
 
36
     <PARAM_ITEM>
 
37
        <PARAM_NAME>dzpdx,dzpdy</PARAM_NAME>
 
38
        <PARAM_DESCRIPTION>
 
39
         <SP>: vectors (or matrices) of the same size than <VERB>xp</VERB> and  <VERB>yp</VERB>, evaluation
 
40
               of the first derivatives of <VERB>S</VERB> at these points</SP>
 
41
        </PARAM_DESCRIPTION> 
 
42
     </PARAM_ITEM>
 
43
     <PARAM_ITEM>
 
44
        <PARAM_NAME>d2zpdxx,d2zpdxy,d2zpdyy</PARAM_NAME>
 
45
        <PARAM_DESCRIPTION>
 
46
         <SP>: vectors (or matrices) of the same size than <VERB>xp</VERB> and  <VERB>yp</VERB>, evaluation of the
 
47
               second derivatives of <VERB>S</VERB> at these points</SP>
 
48
        </PARAM_DESCRIPTION> 
 
49
     </PARAM_ITEM>
 
50
   </PARAM_INDENT>
 
51
  </PARAM>
 
52
  
 
53
  <DESCRIPTION>
 
54
    <P>
 
55
    This is the evaluation routine for cubic Shepard interpolation function computed with
 
56
    <LINK>cshep2d</LINK>, that is :
 
57
    </P>
 
58
        <VERBATIM><![CDATA[
 
59
      zp(i) = S(xp(i),yp(i))   
 
60
      dzpdx(i) = dS/dx(xp(i),yp(i))
 
61
      dzpdy(i) = dS/dy(xp(i),yp(i))  
 
62
      d2zpdxx(i) = d2S/dx2(xp(i),yp(i))
 
63
      d2zpdxy(i) = d2S/dxdy(xp(i),yp(i))  
 
64
      d2zpdyy(i) = d2S/dy2(xp(i),yp(i))
 
65
         ]]></VERBATIM>
 
66
    </DESCRIPTION>
 
67
 
 
68
    <SECTION label="Remark">
 
69
    <P>
 
70
    The interpolant <EM>S</EM> is C2 (twice continuously differentiable) but is also extended by 
 
71
    zero for <EM>(x,y)</EM> far enough the interpolation points. This leads to a discontinuity
 
72
    in a region far outside the interpolation points, and so, is not cumbersome in practice (in a 
 
73
    general manner, evaluation outside interpolation points (i.e. extrapolation) leads to very 
 
74
    inacurate results).
 
75
    </P>
 
76
    </SECTION>
 
77
 
 
78
  <EXAMPLE><![CDATA[
 
79
// see example section of cshep2d
 
80
 
 
81
// this example shows the behavior far from the interpolation points ...
 
82
deff("z=f(x,y)","z = 1+ 50*(x.*(1-x).*y.*(1-y)).^2")
 
83
x = linspace(0,1,10);
 
84
[X,Y] = ndgrid(x,x);
 
85
X = X(:); Y = Y(:); Z = f(X,Y);
 
86
S = cshep2d([X Y Z]);
 
87
// evaluation inside and outside the square [0,1]x[0,1]
 
88
m = 40;
 
89
xx = linspace(-1.5,0.5,m);
 
90
[xp,yp] = ndgrid(xx,xx);
 
91
zp = eval_cshep2d(xp,yp,S);
 
92
// compute facet (to draw one color for extrapolation region
 
93
// and another one for the interpolation region)
 
94
[xf,yf,zf] = genfac3d(xx,xx,zp);
 
95
color = 2*ones(1,size(zf,2));
 
96
// indices corresponding to facet in the interpolation region
 
97
ind=find( mean(xf,"r")>0 & mean(xf,"r")<1 & mean(yf,"r")>0 & mean(yf,"r")<1 );
 
98
color(ind)=3;
 
99
xbasc();
 
100
plot3d(xf,yf,list(zf,color), flag=[2 6 4])
 
101
legends(["extrapolation region","interpolation region"],[2 3],1)
 
102
xselect()
 
103
 ]]></EXAMPLE>
 
104
  <SEE_ALSO>
 
105
    <SEE_ALSO_ITEM>
 
106
      <LINK>cshep2d</LINK>
 
107
    </SEE_ALSO_ITEM>
 
108
  </SEE_ALSO>
 
109
 
 
110
  <AUTHORS>
 
111
     <AUTHORS_ITEM> Robert J. Renka</AUTHORS_ITEM>
 
112
     <AUTHORS_ITEM> B. Pincon (scilab interface)</AUTHORS_ITEM>
 
113
  </AUTHORS>
 
114
 
 
115
</MAN>