|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
代码/ ^# f. K; O1 r) d
function uitable1_CellSelectionCallback(hObject, eventdata, handles)- h# b5 B0 l: X7 T7 f- Z
% hObject handle to uitable1 (see GCBO)* d5 u: p' u+ R1 p; O7 J5 W/ R1 R. i
% eventdata structure with the following fields (see MATLAB.UI.CONTROL.TABLE)
7 |! R, T( |( s3 _5 }3 F% Indices: row and column indices of the cell(s) currently selecteds( U0 @ i! g3 N
% handles structure with handles and user data (see GUIDATA)
" ^- M" Y4 O5 I) a5 d/ n: bnewdata=get(h0bject,'Data');
2 ?! O9 c" Y- o* Mhang=eventdata.Indices;- B2 V) x: X8 k5 o5 p: X
hangIndex=hang(1); ~# |# s- ~1 W7 N" |3 n& {
handles.hangIndex=hangIndex;
: I3 D0 u( G! z+ Q6 v7 zguidata(h0bject,handles);- l5 N! d' e* _: e
% --- Executes on button press in pb2.
& h: w6 r9 h9 y# Lfunction pb2_Callback(hObject, eventdata, handles)
+ @% ]$ a0 g5 P4 X% hObject handle to pb2 (see GCBO)
" V, ~5 m$ r& O% eventdata reserved - to be defined in a future version of MATLAB) G z: E* n0 b; g7 Y
% handles structure with handles and user data (see GUIDATA)
: s8 P9 A+ m1 G5 E$ V( s8 @hangIndex=handles.hangIndex;3 X6 l/ O# d6 }
newdata=get(handles.uitable2,'Data');
2 W1 w: L6 z, @7 P8 E3 onewdata(hangIndex,: )=[];' U! ~( B7 |' e2 e, C3 ?* T
set(handles.uitable2,'Data',newdata);5 f7 e* H0 Z3 Z. o" i
save('newdata.mat','newdata');
: u1 X8 v0 U' s( @. f8 E# |function uitable2_CellSelectionCallback(hObject, eventdata, handles)
: D! |9 u* F' D$ m8 \& C% hObject handle to uitable2 (see GCBO)
" W* ?$ N! M8 _% }, e( L% eventdata structure with the following fields (see MATLAB.UI.CONTROL.TABLE)& H# R& I: j4 ~" r/ k# q7 \5 e
% Indices: row and column indices of the cell(s) currently selecteds' v4 }9 h6 a$ ^& I& \6 M: ]
% handles structure with handles and user data (see GUIDATA)
' h7 V* @! Z; ^5 _newdata=get(h0bject,'Data');
v( W' C/ ] h: D2 ghang=eventdata.Indices;, l2 I- Y% g' d2 e* h' B% W3 h+ e0 s
hangIndex=hang(1);
& P% \0 I/ Q- ^6 ]; x2 phandles.hangIndex=hangIndex;
7 |, L" E; K9 I/ `3 I: Zguidata(h0bject,handles);
( d; x' w" |8 C+ o2 l6 U% --- Executes on button press in pb4.
+ Q5 g: g# g y* Q$ cfunction pb4_Callback(hObject, eventdata, handles)
! d8 G# O6 u' Z s$ h6 _4 z% hObject handle to pb4 (see GCBO)3 h- M% B' V* G# [+ u
% eventdata reserved - to be defined in a future version of MATLAB
* q. ]. [& X# I ^0 a7 V8 a0 D4 H% handles structure with handles and user data (see GUIDATA)& I9 m9 l" j- c
hangIndex=handles.hangIndex;
# D6 n, C' X( F% `( Xnewdata=get(handles.uitable2,'Data');
- U; O: T8 q& D; i$ r4 B4 xnewdata(hangIndex,: )=[];* K) f$ |- e5 N* `# E
set(handles.uitable2,'Data',newdata);: q6 m( o1 h0 F* p! G/ G
save('newdata.mat','newdata');5 J8 p5 |. X/ w* b
3 L( ] L, X, r( w
错误提示
7 U2 D3 {* M2 h4 M. b3 Z F$ o! v/ ^2 j, V( v0 i
4 s+ B, T5 Z* i# u出错* f- [1 C/ k& c/ h8 \
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)one4('pb2_Callback',hObject,eventdata,guidata(hObject)) ( [. T' L6 J1 N( U: h' w3 Q
计算 UIControl Callback 时出错。
; G# S7 {/ \& m& l/ [7 h Z1 I5 {9 O4 p/ n" P% C, [0 _. A0 P3 z
引用了不存在的字段 'hangIndex'。1 b B- _' T6 n' B. R4 d
* _9 f; D. K9 x0 t' C
出错 one4>pb4_Callback (line 146)
& W# B: B* _ O" \hangIndex=handles.hangIndex;7 N6 a2 r8 }. J/ U/ d
8 O6 T; ]1 y3 a. T: I' R; V
出错 gui_maiNFCn (line 95)
1 x# ]$ q. G% `3 _8 K feval(varargin{:});
( `8 M% `! L! Y* j& R( w: a9 @* A# W/ u p
出错 one4 (line 42)
) L9 c$ R' x% ] gui_mainfcn(gui_State, varargin{:});& d0 C( \5 \4 q/ X; C3 k
( b S2 A r& E4 q% w8 e5 i出错
: [' k( x1 _* H3 K" v+ |+ amatlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)one4('pb4_Callback',hObject,eventdata,guidata(hObject)) B- m# y% j. a$ c v$ n
计算 UIControl Callback 时出错。
* z- S2 z8 S+ w |
|