私は matlab gui を使用してフェーズ ロック ループで信号操作を実行していますが、データを削除したと思っていても、データが保存されている場所をコードで把握できないようです。
ここにファイルがありますhttp://sdrv.ms/ZO5hXD
以下は設定機能です。
function axes1_ButtonDownFcn(hObject, eventdata, handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
position = get(gca,'CurrentPoint');
x = position(1);
y = position(3);
%handles.poles=handles.sVar;
%handles.zeros=handles.sVar;
%guidata(hObject,handles);
slType = get(handles.figure1 ,'SelectionType');
if(strcmp(slType,'normal'))
if(y<0.05 && y>-0.05)
line(x,y,'marker','X','HitTest','off');
handles.poles=handles.poles*(handles.sVar-x-y)
guidata(hObject, handles);
else
line(x,y,'marker','X','HitTest','off');
line(x,-y,'marker','X','HitTest','off');
handles.poles=handles.poles*(handles.sVar-x-y)*(handles.sVar-x+y);
guidata(hObject, handles);
end
else
line(x,y,'marker','O','HitTest','off');
handles.zeros=handles.zeros*((handles.sVar-x-y)*(handles.sVar-x+y));
guidata(hObject, handles);
end
update(hObject,handles);
set(hObject,'buttondownfcn',{@axes1_ButtonDownFcn,handles});
以下は、データを削除するためのコールバックです。
% --- Executes on button press in pushbutton1.
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)
guidata(hObject,handles);
delete(findobj(handles.axes1,'Type','line','Marker','X'));
handles.poles=handles.sVar;
guidata(hObject, handles);
update(hObject,handles);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guidata(hObject,handles);
delete(findobj(handles.axes1,'Type','line','Marker','O'));
handles.zeros=handles.sVar;
guidata(hObject, handles);
update(hObject,handles);