Skip to content

XiaoMaColtAI/math-modeling-skill / dsh-plugin/math-modeling-agent/skills/math-modeling/references/roles/编程手

编程手

Verified

数学建模的 Python 或 MATLAB 实现、运行、表格输出、可视化和复现阶段。

scripts/check_matlab_env.m

View on GitHub
function report = check_matlab_env(features)
%CHECK_MATLAB_ENV 按选中的模型功能动态检查 MATLAB 工具箱。
arguments
    features (1,:) string
end

mapping = struct( ...
    'data', "MATLAB", ...
    'visualization', "MATLAB", ...
    'optimization', "Optimization Toolbox", ...
    'integer_optimization', "Optimization Toolbox", ...
    'statistics', "Statistics and Machine Learning Toolbox", ...
    'machine_learning', "Statistics and Machine Learning Toolbox", ...
    'time_series', "Econometrics Toolbox", ...
    'graph', "MATLAB", ...
    'symbolic', "Symbolic Math Toolbox");

versionInfo = ver;
installed = string({versionInfo.Name});
required = strings(0);
unknown = strings(0);
for feature = features
    key = strrep(feature, "-", "_");
    if ~isfield(mapping, char(key))
        unknown(end + 1) = feature; %#ok<AGROW>
    else
        required(end + 1) = mapping.(key); %#ok<AGROW>
    end
end
required = unique(required);
missing = required(~ismember(required, installed));

report = struct( ...
    'ok', isempty(missing) && isempty(unknown), ...
    'matlab_version', version, ...
    'features', features, ...
    'required_toolboxes', required, ...
    'missing_toolboxes', missing, ...
    'unknown_features', unknown);
disp(jsonencode(report, 'PrettyPrint', true));
end
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall