单击RadioButton和Perform Task

时间:2015-10-13 20:52:58

标签: matlab

我正在尝试使用以下逻辑。

function radiobutton1_Callback(hObject, eventdata, handles)
% hObject    handle to radiobutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

filename = 'C:\Users\r001\Desktop\excel_files\Book1.xlsx';
A = xlsread(filename);

A = xlsread('C:\Users\r001\Desktop\excel_files\Book1.xlsx','Sheet1','A1:B10');

h = msgbox('Operation Is Completed');

当我点击radiobutton1时,没有数据从Excel文件中导入,但弹出的信息显示“操作已完成”。

我在这里缺少什么?

另外,理想情况下,我很乐意为此使用Case语句。我想做点什么:

function
   switch
      case1
      case2
      case3
   end
end

0 个答案:

没有答案