初版gui
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
function config = load_config_mat(file_path)
|
||||
%LOAD_CONFIG_MAT Load config struct from a MAT file.
|
||||
|
||||
arguments
|
||||
file_path (1,:) char
|
||||
end
|
||||
|
||||
if ~exist(file_path, 'file')
|
||||
error('load_config_mat:FileNotFound', 'Config file not found: %s', file_path);
|
||||
end
|
||||
|
||||
data = load(file_path, '-mat');
|
||||
if ~isfield(data, 'config')
|
||||
error('load_config_mat:MissingConfigVariable', ...
|
||||
'MAT file does not contain variable ''config'': %s', file_path);
|
||||
end
|
||||
|
||||
config = data.config;
|
||||
Reference in New Issue
Block a user