[討論] ㄧ直無法顯示之前內存的參數 ? (gui)已回收

看板MATLAB作者 (白開水)時間15年前 (2011/01/19 14:42), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
前輩好: 上個程式已經將所運算的結果函數bz(1),(2) 儲存在內 handles.b1 = bz(1); handles.b2 = bz(2); guidata(hObject,handles); 但是當我新開ㄧ個static 準備要讓剛剛取得的函數顯示在上面,卻ㄧ直無法顯示 找了好久文字方塊就是沒有顯示我運算結果的數據,到底哪裡出問題呢? function edit3_Callback(hObject, eventdata, handles) % hObject handle to edit3 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit3 as text % str2double(get(hObject,'String')) returns contents of edit3 as a double s1 = handles.b1; set(handles.edit3,'String',num2str,s1); 有人可能會說或許是handles.b1 = bz(1) 根本沒有存入 但是後來我又新增一個按鈕,然後也是用 s1 = handles.b1 ; s2 = handles.b2 ; 然後按過按鈕後確實有跑出s1和s2的數值 請問我在static上有用錯語法嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 120.96.35.30
文章代碼(AID): #1DDeVWAc (MATLAB)
文章代碼(AID): #1DDeVWAc (MATLAB)