Skip to content
Snippets Groups Projects
Commit 3dd8d75b authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

error function: Fix various syntax bugs

One input argument is required
parent bbb2f2a7
No related branches found
No related tags found
No related merge requests found
...@@ -133,7 +133,7 @@ try ...@@ -133,7 +133,7 @@ try
for i = 1:ndraws for i = 1:ndraws
draw = o.draw(); draw = o.draw();
if ~o.admissible(draw) if ~o.admissible(draw)
error() error('problem in admissible')
end end
end end
t(1) = true; t(1) = true;
......
...@@ -177,8 +177,7 @@ if (distribution==4)% Beta distribution ...@@ -177,8 +177,7 @@ if (distribution==4)% Beta distribution
if length(idx)>1 if length(idx)>1
error('Multiplicity of solutions for the beta distribution specification.') error('Multiplicity of solutions for the beta distribution specification.')
elseif isempty(idx) elseif isempty(idx)
disp('No solution for the beta distribution specification. You should reduce the variance.') error('No solution for the beta distribution specification. You should reduce the variance.')
error();
end end
alpha = real_roots(idx); alpha = real_roots(idx);
beta = ((1-m)*alpha+2*m-1)/m; beta = ((1-m)*alpha+2*m-1)/m;
......
...@@ -44,6 +44,5 @@ if strcmpi(type,'posterior') ...@@ -44,6 +44,5 @@ if strcmpi(type,'posterior')
elseif strcmpi(type,'prior') elseif strcmpi(type,'prior')
CorrFileNumber = length(dir([M_.dname '/prior/moments/' M_.fname '_PriorCorrelations*'])); CorrFileNumber = length(dir([M_.dname '/prior/moments/' M_.fname '_PriorCorrelations*']));
else else
disp('dsge_simulated_theoretical_correlation:: Unknown type!'); error('dsge_simulated_theoretical_correlation:: Unknown type!');
error()
end end
...@@ -44,8 +44,7 @@ elseif strcmpi(type,'prior') ...@@ -44,8 +44,7 @@ elseif strcmpi(type,'prior')
CheckPath('prior/moments',M_.dname); CheckPath('prior/moments',M_.dname);
posterior = 0; posterior = 0;
else else
disp('dsge_simulated_theoretical_covariance:: Unknown type!') error('dsge_simulated_theoretical_covariance:: Unknown type!')
error();
end end
%delete old stale files before creating new ones %delete old stale files before creating new ones
......
...@@ -46,8 +46,7 @@ elseif strcmpi(type,'prior') ...@@ -46,8 +46,7 @@ elseif strcmpi(type,'prior')
CheckPath('prior/moments',M_.dname); CheckPath('prior/moments',M_.dname);
posterior = 0; posterior = 0;
else else
disp('dsge_simulated_theoretical_variance_decomposition:: Unknown type!') error('dsge_simulated_theoretical_variance_decomposition:: Unknown type!')
error()
end end
%delete old stale files before creating new ones %delete old stale files before creating new ones
......
...@@ -84,6 +84,6 @@ end; ...@@ -84,6 +84,6 @@ end;
verbatim; verbatim;
if ~isequal(M_.observed_exo_names, {'ey'; 'ex'}) if ~isequal(M_.observed_exo_names, {'ey'; 'ex'})
error() error('Arguments are not identical')
end end
end; end;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment