Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab 我需要这个单选按钮的帮助_Matlab_User Interface - Fatal编程技术网

Matlab 我需要这个单选按钮的帮助

Matlab 我需要这个单选按钮的帮助,matlab,user-interface,Matlab,User Interface,这个语法有什么问题? 为什么我不能从特定单选按钮Ch1-4设置值 switch get(get(handles.uipanel4,'SelectedObject'),'Tag') % --- Executes on button press in setF. function setF_Callback(hObject, eventdata, handles) % hObject handle to setF (see GCBO) % eventdata reserved - to b

这个语法有什么问题? 为什么我不能从特定单选按钮Ch1-4设置值

switch get(get(handles.uipanel4,'SelectedObject'),'Tag')

% --- Executes on button press in setF.
function setF_Callback(hObject, eventdata, handles)
% hObject    handle to setF (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global hz;
hz=get(handles.editF, 'String');

if handles.Ch1 
    set(handles.fCh1, 'String', hz);

elseif handles.Ch2
    set(handles.fCh2, 'String', hz);

elseif handles.Ch3
    set(handles.fCh3, 'String', hz);

elseif handles.Ch4
    set(handles.fCh4, 'String', hz);
end

你的问题不够具体,不能很好地回答。你遇到了什么样的问题

然而,我的猜测是: 开关getHandles.uipanel4、'SelectedObject','Tag'应该做什么?您启动一个switch语句,但从未定义案例。。。 这应该会导致语法错误。因此,如果你得到任何-这是你应该修复。 请看下面的图片

如果您提供更多信息,我将很乐意修改我的答案