From c5ce7645386c6d2e42a018957e245caa3dc05fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= <stepan@adjemian.eu> Date: Mon, 30 Sep 2024 14:42:52 +0200 Subject: [PATCH] Reset seed in each unit test. --- src/mtest.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mtest.m b/src/mtest.m index 6bc841d..703375c 100644 --- a/src/mtest.m +++ b/src/mtest.m @@ -85,6 +85,7 @@ for i=1:nn % Write the temporary test routine. tid = fopen([FNAME '_test_' int2str(i) '.m'],'w'); fprintf(tid,['function [T,t,LOG] = ' FNAME '_test_' int2str(i) '()\n']); + fprintf(fid, '\nrng(1);\n\n'); fprintf(tid,'try\n'); if (length(file{b1(i)+1})>2 && isequal(file{b1(i)+1}(1:3), '%$ ')) || (length(file{b1(i)+1})>1 && isequal(file{b1(i)+1}(1:2), '%$')) remove_first_columns = true; -- GitLab