]> Creatis software - CreaPhase.git/blob - octave_packages/optiminterp-0.3.3/optiminterp4.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / optiminterp-0.3.3 / optiminterp4.m
1 ## Copyright (C) 2007 Aida Alvera-Azcárate
2 ##
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2 of the License, or
6 ## (at your option) any later version.
7 ##
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 ## GNU General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program; If not, see <http://www.gnu.org/licenses/>.
15
16 ## -*- texinfo -*-
17 ## @deftypefn {Loadable Function} {[@var{fi},@var{vari}] = } optiminterp4(@var{x},@var{y},@var{z},@var{t},@var{f},@var{var},@var{lenx},@var{leny},@var{lenz},@var{lent},@var{m},@var{xi},@var{yi},@var{zi},@var{ti})
18 ## Performs a local 4D-optimal interpolation (objective analysis).
19 ##
20 ## Every elements in @var{f} corresponds to a data point (observation)
21 ## at location  @var{x}, @var{y}, @var{z}, @var{t} with the error variance var
22 ##
23 ## @var{lenx},@var{leny},@var{lenz} and @var{lent} are correlation length in x-,y-,z-direction and time,
24 ## respectively. 
25 ## @var{m} represents the number of influential points.
26 ##
27 ## @var{xi},@var{yi},@var{zi} and @var{ti} are the data points where the field is
28 ## interpolated. @var{fi} is the interpolated field and @var{vari} is 
29 ## its error variance.
30 ##
31 ##
32 ## The background field of the optimal interpolation is zero.
33 ## For a different background field, the background field
34 ## must be subtracted from the observation, the difference 
35 ## is mapped by OI onto the background grid and finally the
36 ## background is added back to the interpolated field.
37 ##
38 ## The error variance of the background field is assumed to 
39 ## have a error variance of one. 
40 ## @end deftypefn
41
42 ## Copyright (C) 2007 Aida Alvera-Azcárate
43 ## Author: Aida Alvera-Azcárate <aalvera@marine.usf.edu> 
44 ## Author: Alexander Barth <barth.alexander@gmail.com>
45
46 function [fi,vari] = optiminterp4(x,y,z,t,f,var,lenx,leny,lenz,lent,m,xi,yi,zi,ti)
47
48 [fi,vari] = optiminterpn(x,y,z,t,f,var,lenx,leny,lenz,lent,m,xi,yi,zi,ti);