[英]MATLAB GUI Guide Error with Map
I'm trying to insert a map into MATLAB's GUI GUIDE and I'm getting the error: 我试图将地图插入到MATLAB的GUI GUIDE中,但出现错误:
Error while evaluating uicontrol Callback 评估uicontrol回调时出错
The map does work when I run it standalone in the command window but when I push the button in GUIDE, it appears then gets distorted, and then I get an error. 当我在命令窗口中独立运行该地图时,它可以工作,但是当我在GUIDE中按按钮时,它会出现,然后变形,然后出现错误。
Here is my code: 这是我的代码:
function temp_button_Callback(hObject,eventdata,handles)
lat = [80 45 52; 45 46 34]
long = [123 132 123; 120 122 119]
temp = [67 68 69; 71 72 73]
axesm('mercator','MapLatLimit',[-50 90],'MapLonLimit',[0 250])
framem on; gridm on;
load coast;
mlabel on;
plabel on;
plotm(lat,long,'k')
contourfm(long,lat,temp)
You've got clear lat long;
你已经很clear lat long;
right before contourfm(long,lat,temp)
. 就在contourfm(long,lat,temp)
。 Clearly you still need those variables, so don't clear them. 显然,您仍然需要这些变量,因此请不要清除它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.