matlab 读取参数,不同策略不同参数个数

来源:互联网 发布:ubuntu根目录空间不足 编辑:程序博客网 时间:2024/09/21 08:16

temp = get(handles.input1,'string');
    inputs{1} = [];
    if strcmp(temp ,'-') == 0
        inputs{1} = str2double(temp);
    end
    temp = get(handles.input2,'string');
    if strcmp(temp ,'-') == 0
        inputs{2} = str2double(temp);
    end
    temp = get(handles.input3,'string');
    if strcmp(temp ,'-') == 0
        inputs{3} = str2double(temp);
    end
    temp = get(handles.input4,'string');
    if strcmp(temp ,'-') == 0
        inputs{4} = str2double(temp);
    end
    temp = get(handles.input5,'string');
    if strcmp(temp ,'-') == 0
        inputs{5} = str2double(temp);
    end
    temp = get(handles.input6,'string');
    if strcmp(temp ,'-') == 0
        inputs{6} = str2double(temp);
    end

0 0