1function save_results(x,s_name,names)
2
3% function save_results(x,s_name,names)
4% save results in appropriate structure
5%
6% INPUT
7%   x: matrix to be saved column by column
8%   s_name: name of the structure where to save the results
9%   names: names of the individual series
10%
11% OUTPUT
12%   none
13%
14% SPECIAL REQUIREMENT
15%   none
16
17% Copyright (C) 2006-2009 Dynare Team
18%
19% This file is part of Dynare.
20%
21% Dynare is free software: you can redistribute it and/or modify
22% it under the terms of the GNU General Public License as published by
23% the Free Software Foundation, either version 3 of the License, or
24% (at your option) any later version.
25%
26% Dynare is distributed in the hope that it will be useful,
27% but WITHOUT ANY WARRANTY; without even the implied warranty of
28% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29% GNU General Public License for more details.
30%
31% You should have received a copy of the GNU General Public License
32% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
33
34global oo_
35
36for i=1:size(x,2)
37    eval([s_name deblank(names(i,:)) '= x(:,i);']);
38end