1樓:匿名使用者
新一個 gui 啊
以新建的gui為parent建立一個edit顯示
用uersdata傳遞資料
2樓:匿名使用者
您好,你可以試試以下的**:
function pushbutton1_callback(hobject, eventdata,
handles)
% hobject handle to pushbutton1 (see gcbo)
% eventdata reserved - to be defined in a future version
of matlab
% handles structure with handles and user data (see
guidata)
open('untitled3.fig');
new_fig = guihandles;
a=get(handles.edit1,'string');
b=get(handles.edit2,'string');
if (get(handles.radiobutton1,'value')==1)
total=str2num(a)+str2num(b);
else
total=str2num(a)/str2num(b);
endc=num2str(total);
set(new_fig.edit3,'string',c)
guidata(hobject, handles);
if (get(handles.checkbox1,'value')==1)
total=str2num(c)+str2num(a);
d=num2str(total);
set(new_fig.edit3,'string',d)
endguidata(hobject, handles);
因為這是的操作是對untitled3.fig中的元素進行的,用handles是對原介面內的元素進行的,你先試試吧。
matlab 圖形使用者介面(gui)的問題
3樓:匿名使用者
因為handles是一個大的結構體,
你每次使用這個語句,就是告訴系統,把handles裡面每一個元素都更新一下。
比如說handles.a=5;
guidata(hobject, handles);
告訴系統,現在handles裡面多了一個元素a,值為5
4樓:匿名使用者
guidata(object_handle,data) stores the variable data as gui data. if object_handle is not a figure handle, then the object's parent figure is used. data can be any matlab variable, but is typically a structure, which enables you to add new fields as required.
儲存資料變數,作為他的呼叫
你可以在help中查詢他的用途的
matlabgui呼叫m檔案及顯示問題
醜水凡 function start callback hobject,eventdata,handles hobject handle to start see gcbo eventdata reserved to be defined in a future version of matlab ...
Matlab GUI選單設計,MATLAB GUI介面選單設計
飛躍夢想華 filename,pathname uigetfile xls pick a segy or su file if isequal filename,0 isequal pathname,0 判斷選擇 bai文件否空du errordlg file not found return en...
關於神經網路BP演算法的輸入問題,用matlab中bp神經網路實現由輸入值預測輸出值的程式
郈山白 可以的!之所以叫bp網路,是因為使用了反向傳遞演算法,這是一種結果導向的自學習方法,用在五子棋上是可以的。因為五子棋的遊戲方法正是很明顯的結果導向的過程。簡單說這麼個過程 1.設定輸入和輸出型別,比如都是座標 x1,y1 x2,y2 2.訓練 你告訴網路 a情況下應該輸出a1 b情況下應該輸...