diff --git a/license.txt b/license.txt
index 1cc2ab8daeaa2b2407674db1c2c56a2eec3c34ea..4b45946361eee3094f44bfbc4978f32e83578bbc 100644
--- a/license.txt
+++ b/license.txt
@@ -99,6 +99,10 @@ Copyright: 1997 Tom Minka <minka@microsoft.com>
            2019 Dynare Team
 License: GPL-3+
 
+Files: matlab/allVL1.m
+Copyright: 2009 Bruno Luong
+License: BSD-2-clause
+
 Files: matlab/gsa/Morris_Measure_Groups.m
        matlab/gsa/Sampling_Function_2.m
 Copyright: 2005 European Commission
diff --git a/matlab/allVL1.m b/matlab/allVL1.m
index 3219ba1b71e60bff2203079259aae506c0a2a7c5..b6a079503b21694768441460d5b2ee3e67f7a7e3 100644
--- a/matlab/allVL1.m
+++ b/matlab/allVL1.m
@@ -37,6 +37,32 @@ function v = allVL1(n, L1, L1ops, MaxNbSol)
 %         1.3, 16/Sep/2009: Correct bug for number of solution
 %         1.4, 18/Dec/2010: + non-recursive engine
 
+% Retrieved from https://www.mathworks.com/matlabcentral/fileexchange/17818-all-permutations-of-integers-with-sum-criteria
+
+% Copyright (c) 2009 Bruno Luong
+% 
+% Redistribution and use in source and binary forms, with or without
+% modification, are permitted provided that the following conditions are
+% met:
+% 
+%     * Redistributions of source code must retain the above copyright
+%       notice, this list of conditions and the following disclaimer.
+%     * Redistributions in binary form must reproduce the above copyright
+%       notice, this list of conditions and the following disclaimer in
+%       the documentation and/or other materials provided with the distribution
+% 
+% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+% POSSIBILITY OF SUCH DAMAGE.
+
 global MaxCounter;
 
 if nargin<3 || isempty(L1ops)