matlab 3个子窗口一个主窗口 选择显示

function rd1_Callback(hObject, eventdata, handles)
    rd1 = get(handles.rd1,'Value');
    if rd1 == 1
        set(handles.rd2,'Value', 0);
        set(handles.rd3,'Value', 0);
        % Plotting the main graph
        plot(handles.mainGraph, handles.benchmarks);
        [r c] = size(handles.dataset.data);
        xlim(handles.mainGraph, [0 r+2]);
    end
  


function rd2_Callback(hObject, eventdata, handles)
    rd2 = get(handles.rd2,'Value');
    if rd2 == 1
        set(handles.rd1,'Value', 0);
        set(handles.rd3,'Value', 0);
        errorbar(handles.mainGraph, handles.expected, handles.deviation, 'xr');
        [r c] = size(handles.dataset.data);
        xlim(handles.mainGraph, [0 c+1]);
    end
   


function rd3_Callback(hObject, eventdata, handles)
    rd3 = get(handles.rd3,'Value');
    if rd3 == 1
        set(handles.rd1,'Value', 0);
        set(handles.rd2,'Value', 0);
        plot(handles.mainGraph,handles.allStocks);
        [r c] = size(handles.dataset.data);
        xlim(handles.mainGraph, [0 r+2]);
    end

你可能感兴趣的:(matlab 3个子窗口一个主窗口 选择显示)