From 7b68ba771db33da3c4c32dabed89853ea35e0562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Argos=29?= <stepan@adjemian.eu> Date: Wed, 3 Jul 2024 07:52:26 +0200 Subject: [PATCH] Add powerShell script. - Translation of run.sh (not tested), - Assumes that matlab is in the path, - Requires adjustment of the paths defined at the top of compute_transition.m, - Script execution must be allowed. --- models/run.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 models/run.ps1 diff --git a/models/run.ps1 b/models/run.ps1 new file mode 100644 index 0000000..678eec4 --- /dev/null +++ b/models/run.ps1 @@ -0,0 +1,15 @@ +function Run-MatlabBatch { + param ( + [string]$fileName, + [int]$modelsValue, + [string]$logFile + ) + + while (-not (Test-Path $fileName)) { + matlab -batch "MODELS=$modelsValue; compute_transition;" | Tee-Object -FilePath $logFile -Append + } +} + +Run-MatlabBatch -fileName "m10-done.info" -modelsValue 1 -logFile "m10-all.log" +Run-MatlabBatch -fileName "m20-done.info" -modelsValue 2 -logFile "m20-all.log" +Run-MatlabBatch -fileName "m30-done.info" -modelsValue 3 -logFile "m30-all.log" \ No newline at end of file -- GitLab