diff --git a/matlab/write_latex_definitions.m b/matlab/write_latex_definitions.m
index e707538cfc9be8e07ca70aa4e30b34482a65e891..258cff92051bdfb838ed5abeaf2468afe131690a 100644
--- a/matlab/write_latex_definitions.m
+++ b/matlab/write_latex_definitions.m
@@ -1,10 +1,10 @@
-function write_latex_definitions(M_)
+function write_latex_definitions
 %function write_latex_definitions
 % Writes a latex file containing the variable names, latex names, and
 % tags/comments
 %
 % INPUTS
-%    M_
+%    none
 %
 % OUTPUTS
 %    none
@@ -29,6 +29,8 @@ function write_latex_definitions(M_)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+global M_;
+
 if M_.exo_det_nbr == 0
     tables = {'Endogenous', 'Exogenous', 'Parameters'};
     M_var_root = {'M_.endo', 'M_.exo', 'M_.param'};