diff --git a/doc/dynare.texi b/doc/dynare.texi
index a935e677cd5e04cbc31501f11a4f68283db99810..8c9837e8aa13be0413217cd34cd697e3e4458c3b 100644
--- a/doc/dynare.texi
+++ b/doc/dynare.texi
@@ -59,7 +59,7 @@
 @c %**end of header
 
 @copying
-Copyright @copyright{} 1996-2012, Dynare Team.
+Copyright @copyright{} 1996-2013, Dynare Team.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -4039,13 +4039,17 @@ but the @code{smoother} option is used, it is a roundabout way to
 compute the smoothed value of the variables of a model with calibrated parameters.
 
 @item 1
-Uses @code{fmincon} optimization routine (not available under Octave)
+Uses @code{fmincon} optimization routine (available under MATLAB if
+the optimization toolbox is installed; not available under Octave)
 
 @item 2
 Value no longer used
 
 @item 3
-Uses @code{fminunc} optimization routine
+Uses @code{fminunc} optimization routine (available under MATLAB if
+the optimization toolbox is installed; available under Octave if the
+@uref{http://octave.sourceforge.net/optim/,optim} package from
+Octave-Forge is installed)
 
 @item 4
 Uses Chris Sims's @code{csminwel}
diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m
index fdcda8009aaa7272ce6fd366d5f3d6fa299afc55..6fbf06caab37914bf366c9e019a468d67ce86943 100644
--- a/matlab/dynare_estimation_1.m
+++ b/matlab/dynare_estimation_1.m
@@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2003-2012 Dynare Team
+% Copyright (C) 2003-2013 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -189,6 +189,12 @@ end
 if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
     switch options_.mode_compute
       case 1
+        if exist('OCTAVE_VERSION')
+            error('Option mode_compute=1 is not available under Octave')
+        elseif ~user_has_matlab_license('optimization_toolbox')
+            error('Option mode_compute=1 requires the Optimization Toolbox')
+        end
+
         optim_options = optimset('display','iter','LargeScale','off', ...
                                  'MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6);
         if isfield(options_,'optim_opt')
@@ -202,6 +208,12 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
       case 2
         error('ESTIMATION: mode_compute=2 option (Lester Ingber''s Adaptive Simulated Annealing) is no longer available')
       case 3
+        if exist('OCTAVE_VERSION') && ~user_has_octave_forge_package('optim')
+            error('Option mode_compute=3 requires the optim package')
+        elseif ~exist('OCTAVE_VERSION') && ~user_has_matlab_license('optimization_toolbox')
+            error('Option mode_compute=3 requires the Optimization Toolbox')
+        end
+
         optim_options = optimset('display','iter','MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6);
         if isfield(options_,'optim_opt')
             eval(['optim_options = optimset(optim_options,' options_.optim_opt ');']);
@@ -326,6 +338,12 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
         end
       case 7
         % Matlab's simplex (Optimization toolbox needed).
+        if exist('OCTAVE_VERSION') && ~user_has_octave_forge_package('optim')
+            error('Option mode_compute=7 requires the optim package')
+        elseif ~exist('OCTAVE_VERSION') && ~user_has_matlab_license('optimization_toolbox')
+            error('Option mode_compute=7 requires the Optimization Toolbox')
+        end
+
         optim_options = optimset('display','iter','MaxFunEvals',1000000,'MaxIter',6000,'TolFun',1e-8,'TolX',1e-6);
         if isfield(options_,'optim_opt')
             eval(['optim_options = optimset(optim_options,' options_.optim_opt ');']);