您的位置:首页 > 编程语言 > MATLAB

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

2016-10-29 04:09 260 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: