www.pudn.com > Kalman_matlab00000.rar > axislimit_callback.m, change:2003-10-27,size:529b


function axislimit_callback 
prompt={'Xlimit:','Ylimit:'}; 
title='Input parameters'; 
lines=[1 1]'; 
def={num2str([0  1000]),num2str([-.5 1])}; 
answer=inputdlg(prompt,title,lines,def); 
 
data=get(gcbo,'userdata'); 
 
xlim=str2num(answer{1}); 
if ~isempty(xlim) 
    set(gca,'xlim',xlim); 
    data(1)=xlim(1); 
    data(2)=xlim(2); 
end  
ylim=str2num(answer{2}); 
if ~isempty(ylim) 
    set(gca,'ylim',ylim); 
    data(3)=ylim(1); 
    data(4)=ylim(2); 
end 
MV=findobj(gcf,'tag','axis'); 
set(MV,'userdata',data); 
hold on