Membuat Kursor :
1. Buat "Axes"
2. Buat "Pushbottom"
3. Ketikkan script di bawah ini :
S = handles.S;
axes(handles.axes1);
% Selection of location
if isfield(handles,'api')
handles.api.delete();
rmfield(handles,'api');
rmfield(handles,'hRect');
axes(handles.axes1);
imshow(S);
end
axes(handles.axes1);
sz = size(S);
handles.hRect = imrect(gca,[round(sz(2)/2) round(sz(1)/2) 20 20]); % Select object
handles.api = iptgetapi(handles.hRect);
guidata(hObject, handles);
kalimat3='Kursor';
set(handles.text1,'string',kalimat3)
4. Save
5. Run
set(handles.text1,'string',kalimat3)
"Scrip ini menampilkan tulisan "Kursor" saja.
2. Lihat capture 22-23