我有一个用户输入请求框基本上写在matlab建议http://www.mathworks.com/help/matlab/ref/inputdlg.html .

prompt = {'Enter spot number'};
dlg_title = 'Input';
num_lines = 1;
def = {'9'};
answer = inputdlg(prompt,dlg_title,num_lines,def);
handles.count = str2double(answer{1});

但是,对话框带有轴标签,如下图链接所示:

http://imgur.com/yPUYTJb

编辑:事实证明,windowsbuttonmotion函数正在做的事情 . 我在函数中评估它,而不是通过调用第二个函数 . 像这样:

function figure1_WindowButtonMotionFcn(hObject, eventdata, handles)

global loop_counter diameter

pos = get(gca, 'currentpoint'); % get mouse location on figure
x = pos(1,1); y = pos(1,2); % assign locations to x and y
set(handles.lbl_x, 'string', ['x loc:' num2str(x)]); % update text for x loc
set(handles.lbl_y, 'string', ['y loc:' num2str(y)]); % update text for y loc 
const = diameter/2;

for i = 1:loop_counter
    center(i,:) = getPosition(handles.trap(handles.unselected(i)))+const;
    if(((x-center(i,1))^2+(y-center(i,2))^2)<= const^2)
        setColor(handles.trap(handles.unselected(i)), 'red');
    else
        setColor(handles.trap(handles.unselected(i)), 'blue');
    end
end

guidata(hObject, handles)

我怎么能摆脱他们?

谢谢 .