From f337c2b072fa1b8c54178b6489c6ef428b7178e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Sat, 7 Sep 2013 14:31:50 +0200 Subject: [PATCH] Fixed bugs (misuse of inputname function, as in commit #4ce2c3644af333733d802383559de8c0340213bd). --- matlab/@dynDates/append.m | 2 +- matlab/@dynDates/pop.m | 4 ++-- matlab/@dynDates/sort.m | 2 +- matlab/@dynDates/unique.m | 2 +- matlab/particle/residual_resampling.m | 2 +- matlab/particle/traditional_resampling.m | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/matlab/@dynDates/append.m b/matlab/@dynDates/append.m index b0432928e..0fc59f034 100644 --- a/matlab/@dynDates/append.m +++ b/matlab/@dynDates/append.m @@ -55,7 +55,7 @@ if ~isa(dd,'dynDates') end if ~(isa(a,'dynDate') || isa(a,'dynDates') || ischar(a)) - error(['dynDates::append: Input argument ' inputname(a) ' has to be ' ... + error(['dynDates::append: Input argument ' inputname(2) ' has to be ' ... 'a dynDate object or a dynDates object or a string (formatted date).']) end diff --git a/matlab/@dynDates/pop.m b/matlab/@dynDates/pop.m index 3f11cb8c1..5c0885d83 100644 --- a/matlab/@dynDates/pop.m +++ b/matlab/@dynDates/pop.m @@ -51,7 +51,7 @@ function dd = pop(dd,a) % --*-- Unitary tests --*-- % AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr if ~isa(dd,'dynDates') - error(['dynDates::pop: Input argument ' inputname(dd) ' has to be a dynDates object.']) + error(['dynDates::pop: Input argument ' inputname(1) ' has to be a dynDates object.']) end if nargin<2 @@ -62,7 +62,7 @@ if nargin<2 end if nargin>1 && ~(isa(a,'dynDate') || ischar(a)) - error(['dynDates::pop: Input argument ' inputname(a) ' has to be a dynDate object or a string (formatted date).']) + error(['dynDates::pop: Input argument ' inputname(2) ' has to be a dynDate object or a string (formatted date).']) end if ~isa(a,'dynDate') diff --git a/matlab/@dynDates/sort.m b/matlab/@dynDates/sort.m index 53e62c49d..2a39dbd20 100644 --- a/matlab/@dynDates/sort.m +++ b/matlab/@dynDates/sort.m @@ -47,7 +47,7 @@ function dd = sort(dd) % --*-- Unitary tests --*-- % along with Dynare. If not, see . if ~isa(dd,'dynDates') - error(['dynDates::sort: Input argument ' inputname(dd) ' has to be a dynDates object.']) + error(['dynDates::sort: Input argument ' inputname(1) ' has to be a dynDates object.']) end if dd.ndat==1 diff --git a/matlab/@dynDates/unique.m b/matlab/@dynDates/unique.m index 340c007fe..c800fd9b8 100644 --- a/matlab/@dynDates/unique.m +++ b/matlab/@dynDates/unique.m @@ -47,7 +47,7 @@ function dd = unique(dd) % --*-- Unitary tests --*-- % along with Dynare. If not, see . if ~isa(dd,'dynDates') - error(['dynDates::unique: Input argument ' inputname(dd) ' has to be a dynDates object.']) + error(['dynDates::unique: Input argument ' inputname(1) ' has to be a dynDates object.']) end if dd.ndat==1 diff --git a/matlab/particle/residual_resampling.m b/matlab/particle/residual_resampling.m index 55fe58b75..c2f09e3b8 100644 --- a/matlab/particle/residual_resampling.m +++ b/matlab/particle/residual_resampling.m @@ -59,7 +59,7 @@ switch length(noise) case number_of_particles kitagawa_resampling = 0; otherwise - error(['particle::resampling: Unknown method! The size of the second argument (' inputname(noise) ') is wrong.']) + error(['particle::resampling: Unknown method! The size of the second argument (' inputname(3) ') is wrong.']) end % Set vectors of indices. diff --git a/matlab/particle/traditional_resampling.m b/matlab/particle/traditional_resampling.m index a36f93b60..6c7b70ed0 100644 --- a/matlab/particle/traditional_resampling.m +++ b/matlab/particle/traditional_resampling.m @@ -66,7 +66,7 @@ switch length(noise) case number_of_particles kitagawa_resampling = 0; otherwise - error(['particle::resampling: Unknown method! The size of the second argument (' inputname(noise) ') is wrong.']) + error(['particle::resampling: Unknown method! The size of the second argument (' inputname(3) ') is wrong.']) end % Get the empirical CDF.