|
楼主 |
发表于 2009-1-14 09:30
|
显示全部楼层
我的问题解决了和大家分享一下
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)
global x
[filename path]=uigetfile('*.txt','please input');
st=[path filename];
x=load(st)
% --- 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)
global x
width=1200:400:4000;%x
depth=1200:400:3600;%y
height=x;
wi=1200:50:4000;
di=1200:50:3600;
di=di';
zcubic=interp2(width,depth,height,wi,di,'cubic');
%在二维上标注等高线
[C,H]=contour(wi,di,zcubic);
clabel(C,H)
xlabel('Width')
ylabel('Depth')
title('在二维上标注等高线');
axes(handles.axes1) |
评分
-
1
查看全部评分
-
|