From f12465f09889f211b84360d2a695e6e0efe9cc1d Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Sun, 30 Mar 2025 18:31:44 +0200
Subject: [PATCH] add status if not yet field from non-TCV cases

---
 matlab/gdat.m | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/matlab/gdat.m b/matlab/gdat.m
index 99271c74..7a0458e8 100644
--- a/matlab/gdat.m
+++ b/matlab/gdat.m
@@ -206,6 +206,14 @@ try
     % needed since some substructure have machine name like mapping_for
     gdat_data.gdat_params.machine = lower(gdat_data.gdat_params.machine);
   end
+  if ~isfield(gdat_data,'status')
+    if exist('error_status','var')
+      gdat_data.status = error_status;
+    else
+      error_status = 0;
+      gdat_data.status = error_status;
+    end
+  end
 
 catch ME_gdat
   warning(['problems calling gdat_' lower(machine_eff)]);
-- 
GitLab