GUIDE uita​ble_CellSe​lectionCal​lback エラー

조회 수: 1 (최근 30일)
Shinij Kumagai
Shinij Kumagai 2020년 8월 16일
GUIDE Tableコンポーネントで、セルを編集(CellSelectionCallback )すると、下記のエラーが発生します。
解決策を教えていただけると幸いです。
「try~catch」文で回避していますが、エラーを解決したいです。
◯エラー
インデックスが行列の次元を超えています。
エラー: GraphSet2>uitable1_CellSelectionCallback (line299)
if selection(2)==1;
エラー: gui_mainfcn (line 95)
feval(varargin{:});
エラー: GraphSet2 (line 42)
gui_mainfcn(gui_State, varargin{:});
エラー:
@(hObject,eventdata)GraphSet2('uitable1_CellSelectionCallback',hObject,eventdata,guidata(hObject))
Error while evaluating Table CellSelectionCallback
◯コード
unction uitable1_CellSelectionCallback(hObject, eventdata, handles)
% hObject handle to uitable1 (see GCBO)
% eventdata structure with the following fields (see MATLAB.UI.CONTROL.TABLE)
% Indices: row and column indices of the cell(s) currently selecteds
% handles structure with handles and user data (see GUIDATA)
VariableList=handles.VariableList;
data1=handles.data1;
table = get(handles.uitable1,'Data');
selection = eventdata.Indices;
% try
if selection(2)==1;
[V,~]=listdlg('ListString',VariableList,'SelectionMode','single');
Vlabel=VariableList(V);
V=data1(:,V);
Vmin={round(min(V))};
Vmax={round(max(V))};
table(selection(1),1)=Vlabel;
table(selection(1),2)=Vmin;
table(selection(1),3)=Vmax;
set(handles.uitable1,'Data',table);
else
return
end
% catch e
% e;
% end

답변 (0개)

카테고리

Help CenterFile Exchange에서 常微分方程式에 대해 자세히 알아보기

제품


릴리스

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!