Files
mcm-26-b/scripts/matlab/load_data.m
T
2026-09-13 10:27:09 +08:00

12 lines
453 B
Matlab
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function D = load_data(S, name)
%LOAD_DATA 读取 scripts/build_figure_data.py 预先写好的绘图数据并规范化文本字段。
path = fullfile(S.data_dir, [name '.mat']);
if ~isfile(path)
error('缺少绘图数据:%s(请先运行 scripts/build_figure_data.py --prepare)', path);
end
D = normalize_text(load(path));
if isfield(D, 'switch_') && ~isfield(D, 'switch_s')
D.switch_s = D.switch_;
end
end