You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行MATLAB脚本correctLegID_openpose.m提示输入参数不足求助

解决correctLegID_openpose.m运行时的"Not enough input arguments"错误

这个错误的核心原因是correctLegID_openpose.m脚本需要接收一个名为output_name的输入参数,你直接用run("correctLegID_openpose.m")运行时没有传递该参数,导致脚本执行到第3行的sprintf调用时缺少必要变量。

解决方法:

  • 直接命令行传参运行:
    跳过run命令,直接在MATLAB命令行传入你的输出文件名前缀,比如:

    correctLegID_openpose('你的输出文件前缀');
    

    把你的输出文件前缀替换成实际需要的名称(比如你的OpenPose输出数据对应的前缀)。

  • 在脚本中先定义参数再调用:
    如果需要在其他脚本中调用这个函数,先定义output_name变量再执行:

    output_name = 'gait_test_data'; % 示例前缀
    correctLegID_openpose(output_name);
    
  • 给脚本添加默认参数(可选):
    如果你希望脚本支持无参运行,可以修改correctLegID_openpose.m的开头,添加参数默认值逻辑:

    if nargin < 1
        output_name = 'default_output'; % 设置你需要的默认前缀
    end
    

    这样即使不传参,脚本也能使用默认值执行。

内容的提问来源于stack exchange,提问作者Sritej Padmanabhan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 00:55:33