subsample: check for correct number of arguments to function

parent fbd5f420
Pipeline #734 passed with stage
in 1 minute and 16 seconds
......@@ -41,6 +41,10 @@ function p = subsample(o, d1, d2) % --*-- Unitary tests --*--
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if nargin < 1 || nargin > 3
error('function takes 1 to 3 arguments')
end
if nargin == 1
p = copy(o);
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment