Azzera filtri
Azzera filtri

GUIDE uita​ble_CellSe​lectionCal​lback エラー

1 visualizzazione (ultimi 30 giorni)
Shinij Kumagai
Shinij Kumagai il 16 Ago 2020
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

Risposte (0)

Categorie

Scopri di più su GUIDE アプリの移行 in Help Center e File Exchange

Prodotti


Release

R2015a

Community Treasure Hunt

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

Start Hunting!