From a68f3fc082db27566eabd254241116c0e1af0082 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Thu, 31 Jan 2019 12:39:01 +0100 Subject: [PATCH] remove unused output from functions --- matlab/check.m | 4 ++-- matlab/clear_persistent_variables.m | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/matlab/check.m b/matlab/check.m index 02c8023b3..219ce1868 100644 --- a/matlab/check.m +++ b/matlab/check.m @@ -12,7 +12,7 @@ function [eigenvalues_,result,info] = check(M, options, oo) % - result [integer] scalar, equal to 1 if Blanchard and Kahn conditions are satisfied, zero otherwise. % - info [integer] scalar or vector, error code as returned by resol routine. -% Copyright (C) 2001-2018 Dynare Team +% Copyright (C) 2001-2019 Dynare Team % % This file is part of Dynare. % @@ -42,7 +42,7 @@ end oo.dr=set_state_space(oo.dr,M,options); -[dr,info,M,options,oo] = resol(1,M,options,oo); +[dr,info,M,options,~] = resol(1,M,options,oo); if info(1) ~= 0 && info(1) ~= 3 && info(1) ~= 4 print_info(info, 0, options); diff --git a/matlab/clear_persistent_variables.m b/matlab/clear_persistent_variables.m index c3250fb4d..1efa2263f 100644 --- a/matlab/clear_persistent_variables.m +++ b/matlab/clear_persistent_variables.m @@ -2,7 +2,7 @@ function clear_persistent_variables(folder, writelistofroutinestobecleared) % Clear all the functions with persistent variables in directory folder (and subdirectories). -% Copyright (C) 2015-2017 Dynare Team +% Copyright (C) 2015-2019 Dynare Team % % This file is part of Dynare. % @@ -33,11 +33,11 @@ DYNARE_FOLDER = strrep(which('dynare'),'dynare.m',''); if writelistofroutinestobecleared if ~exist('list_of_functions_to_be_cleared.m') || isolder(sprintf('%slist_of_functions_to_be_cleared.m', DYNARE_FOLDER), DYNARE_FOLDER) if isunix() || ismac() - [status, output] = system(sprintf('grep -lr ^persistent %s', folder)); + [~, output] = system(sprintf('grep -lr ^persistent %s', folder)); list_of_files = strsplit(output); list_of_files(find(cellfun(@isempty, list_of_files))) = []; else - [status, output] = system(sprintf('findstr /B/S/M persistent %s\\*', folder)); + [~, output] = system(sprintf('findstr /B/S/M persistent %s\\*', folder)); list_of_files = strsplit(output); list_of_files(find(cellfun(@isempty, list_of_files))) = []; i = 1; mobius = true; @@ -52,11 +52,11 @@ if writelistofroutinestobecleared end end end - [paths, list_of_functions, extensions] = cellfun(@fileparts, list_of_files, 'UniformOutput',false); + [~, list_of_functions, ~] = cellfun(@fileparts, list_of_files, 'UniformOutput',false); cellofchar2mfile(sprintf('%slist_of_functions_to_be_cleared.m', DYNARE_FOLDER), list_of_functions) end return end list_of_functions_to_be_cleared; -clear(list_of_functions{:}); \ No newline at end of file +clear(list_of_functions{:}); -- GitLab