|
1 | 1 | % STK_PREDICT performs a kriging prediction |
2 | 2 | % |
3 | 3 | % CALL: ZP = stk_predict (MODEL, XP) |
4 | | -% CALL: ZP = stk_predict (MODEL, DATA, XP) |
5 | 4 | % CALL: ZP = stk_predict (MODEL, XI, ZI, XP) |
6 | 5 | % |
7 | 6 | % performs a kriging prediction at the points XP, given the MODEL and, |
8 | | -% if available, additional data provided as a single DATA agument or |
9 | | -% as apair (XI, ZI). |
| 7 | +% if available, additional data provided as a pair (XI, ZI). |
10 | 8 | % |
11 | 9 | % The MODEL argument can be either a prior model structure (as provided |
12 | 10 | % by stk_model) or a model object (for instance, a posterior model |
|
15 | 13 | % model is first updated with the data before the prediction is actually |
16 | 14 | % carried out. |
17 | 15 | % |
18 | | -% The DATA argument, in the second calling syntax, is expected to be an |
19 | | -% stk_iodata object. Given separate input/output arguments XI an ZI, |
20 | | -% using the fourth calling syntax is equivalent to using a DATA argument |
21 | | -% equal to stk_iodata (XI, ZI). |
22 | | -% |
23 | 16 | % The input arguments XI, ZI, and XP can be either numerical matrices or |
24 | 17 | % dataframes. More precisely, on an input space of dimension DIM, |
25 | 18 | % |
|
94 | 87 |
|
95 | 88 | case 2 % CALL: [...] = stk_predict (MODEL, X_PRD) |
96 | 89 | x_prd = varargin{1}; |
97 | | - |
98 | | - case 3 % CALL: [...] = stk_predict (MODEL, DATA, X_PRD) |
99 | | - model = stk_model_gpposterior (model, varargin{1}); |
100 | | - x_prd = varargin{2}; |
| 90 | + |
| 91 | + case 3 |
| 92 | + stk_error ('Incorrect number of input arguments', ... |
| 93 | + 'SyntaxError'); |
101 | 94 |
|
102 | 95 | case 4 % CALL: [...] = stk_predict (MODEL, X_OBS, Z_OBS, X_PRD) |
103 | 96 | model = stk_model_gpposterior (model, varargin{1}, varargin{2}); |
104 | 97 | x_prd = varargin{3}; |
105 | | - |
| 98 | + |
106 | 99 |
|
107 | 100 | end % switch |
108 | 101 |
|
|
0 commit comments