Files
3D_EDFM_SIM-X/gui_support/results/load_results_mat.m
T
2026-03-16 16:57:25 +08:00

19 lines
483 B
Matlab

function results = load_results_mat(file_path)
%LOAD_RESULTS_MAT Load results struct from a MAT file.
arguments
file_path (1,:) char
end
if ~exist(file_path, 'file')
error('load_results_mat:FileNotFound', 'Results file not found: %s', file_path);
end
data = load(file_path, '-mat');
if ~isfield(data, 'results')
error('load_results_mat:MissingResultsVariable', ...
'MAT file does not contain variable ''results'': %s', file_path);
end
results = data.results;