v4: added save_results.m to save results in structures

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1025 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2006-11-04 16:16:25 +00:00
parent f96177dee8
commit 3aabe74278
1 changed files with 21 additions and 0 deletions

21
matlab/save_results.m Normal file
View File

@ -0,0 +1,21 @@
function save_results(x,s_name,names)
% function save_results(x,s_name,names)
% save results in appropriate structure
% INPUT
% x: matrix to be saved column by column
% s_name: name of the structure where to save the results
% names: names of the individual series
% OUTPUT
% none
% ALGORITHM
% none
% SPECIAL REQUIREMENT
% none
%
% part of DYNARE, copyright S. Adjemian, M. Juillard (2006)
% Gnu Public License.
global oo_
for i=1:size(x,2)
eval([s_name deblank(names(i,:)) '= x(:,i);']);
end