爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4830|回复: 5

[程序设计] 空间插值EasyKriging工具箱运行错误

[复制链接]

新浪微博达人勋

发表于 2019-7-20 18:43:53 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
找到一个做空间克里金插值的工具箱,里面有详细的操作说明,目前版本是3.0,应该是个可靠的工具包,但我运行的时候无法进入GUI界面,请教各位是否是GUI的问题还是我的系统的问题。我用的WIN10和WIN7 64位系统,matlab的2016a和2016b都试过,报错的是同样的。部分启动代码如下,中的绿色部分为错误指向的地方,请教该怎么修改,多谢多谢:
Startkrig
clear global
close all

global para                         % all setting and processing parameters
global data                  % input and output data
global hdl                        % handles for all windows
global color                % color RGB

%% Matlab Version
Ver=ver;
Version=[];
for i = 1:length(Ver)
    p=strcmp(Ver(i).Name,'MATLAB');
    q=strcmp(Ver(i).Name,'MATLAB Toolbox');
    if p == 1 | q == 1
        Version = floor(str2num(Ver(i).Version(1:3)));
    end
end
if ~isempty(Version)
    para.Matlab_Version=Version;
    initialization6x
    hdl.navigator.h0=main_menu3d;
    disp_images;
else
    disp(['Can''t determine what version of your Matlab software'])
end

main_menu3d
function fig = main_menu3d()
%%  base window
%%
%%  Kriging Software Package  version 3.0,   May 1, 2004
%%  Copyright (c) 1999, 2001, 2004, property of Dezhang Chu and Woods Hole Oceanographic
%%  Institution.  All Rights Reserved.

global hdl color

load window_position
hdl.window_position=win_pos;

if ~isempty(findobj('type','figure','Tag','Navigator'))
  figure(hdl.navigator.h0);
  return
end

hdl.navigator.h0 = figure('Units','normalized', ...
        'Color',color.background, ...
        'Name','Navigator', ...
        'Position','win_pos', ...
    'NumberTitle','off', ...
        'Tag','Navigator');

    set(0, 'showhidden', 'on');
    ch=get(gcf, 'children');
%   delete(ch(1));                              %File
   wmhdl=findobj(ch,'Label','&File');                    
   delete(wmhdl);
   ch(find(ch = wmhdl))=[];
%        delete(ch(2))                                                                %Help
   wmhdl=findobj(ch,'Label','&Help');                    
   delete(wmhdl);
   ch(find(ch == wmhdl))=[];
%        delete(ch(4))                                                                %Tools
   wmhdl=findobj(ch,'Label','&Tools');               
   delete(wmhdl);
   ch(find(ch == wmhdl))=[];
%   delete(ch(5))                                                                %Edit
   wmhdl=findobj(ch,'Label','&Edit');               
   delete(wmhdl);
   ch(find(ch == wmhdl))=[];
%      new feature of V6.x                      %insert
   wmhdl=findobj(ch,'Label','&Insert');       
   if ~isempty(wmhdl)
     delete(wmhdl);
     ch(find(ch == wmhdl))=[];
   end
%      new feature of V6.x                      %View
   wmhdl=findobj(ch,'Label','&View');               
   if ~isempty(wmhdl)
     delete(wmhdl);
     ch(find(ch == wmhdl))=[];
   end
%      new feature of V7.0                     
   wmhdl=findobj(ch,'Label','&Desktop');            %Desktop
   if ~isempty(wmhdl)
     delete(wmhdl);
     ch(find(ch == wmhdl))=[];
   end

%%    Delete Toolbar
   toolbar_hdl=findobj(ch,'Type','uitoolbar');
   delete(toolbar_hdl);
   ch(find(ch == toolbar_hdl))=[];

h1 = uicontrol('Parent',hdl.navigator.h0, ...
        'Units','normalized', ...
        'Callback','copyright', ...
        'FontSize',16, ...
        'BackgroundColor',color.background, ...
        'FontWeight','bold', ...
        'ForegroundColor',[0 0 1], ...
        'Position',[0.26 0.9 0.5 0.06], ...
        'String','EasyKrig  V3.0', ...
        'Style','text', ...
        'Tag','StaticText1');
h1 = uicontrol('Parent',hdl.navigator.h0, ...
        'Units','normalized', ...
        'BackgroundColor',color.background, ...
        'FontSize',14, ...
        'FontWeight','bold', ...
        'ForegroundColor',[0 0 0], ...
        'ListboxTop',0, ...
        'Position',[0.1 0.85 0.8 0.046], ...
        'String','WOODS HOLE OCEANOGRAPHIC INSTITUTION', ...
        'Style','text', ...
        'Tag','StaticText2');


h1 = uicontrol('Parent',hdl.navigator.h0, ...
        'Units','normalized', ...
        'Callback','close all', ...
        'FontSize',10, ...
        'FontWeight','bold', ...
        'ListboxTop',0, ...
        'Position',[0.82 0.1 0.1 0.06], ...
        'String','Quit', ...
        'Tag','Quit');

h2(1)= uimenu('Parent',hdl.navigator.h0,'label','&Task');
h2(2)=uimenu(h2(1),'label','   &Load Data','callback','dataprep3dfig;','separator','off');
h2(3)=uimenu(h2(1),'label','   &Variogram','callback','variogram3dfig;','separator','off');
h2(4)=uimenu(h2(1),'label','   &Kriging','callback','kriging3dfig;','separator','off');
h2(5)=uimenu(h2(1),'label','   &Visualization','callback','dispkrig3dfig;','separator','off');
h2(6)= uimenu(h2(1),'label',' &Save Window Position','callback','save_window_pos(hdl.navigator.h0);','separator','on');


h3(1)=uimenu('Parent',hdl.navigator.h0,'label','&About');
h3(2)= uimenu(h3(1),'label','&EasyKrig3.0','callback','program_info(1);');
h3(3)= uimenu(h3(1),'label','&Kriging','callback','program_info(2);');
h3(4)= uimenu(h3(1),'label','&ReadMe','callback','program_info(3);');
h3(5)= uimenu(h3(1),'label',' &Variable Structure','callback','edit variables.txt','separator','on');

h4=uimenu('Parent',hdl.navigator.h0,'label','&Help');
h4a= uimenu(h4,'label','&Task');
uimenu(h4a,'label','   &Load Data','callback','navigator_help(1)','separator','off');
uimenu(h4a,'label','   &Variogram','callback','navigator_help(1)','separator','off');
uimenu(h4a,'label','   &Kriging','callback','navigator_help(1)','separator','off');
uimenu(h4a,'label','   &Visualization','callback','navigator_help(1)','separator','off');
uimenu(h4a,'label','   &Save Window Position','callback','navigator_help(2)','separator','on');
uimenu(h4a,'label','   &Quit','callback','navigator_help(2)','separator','off');

h5= uimenu('Parent',hdl.navigator.h0,'label','&Quit','callback','close all;');

if nargout > 0, fig = hdl.navigator.h0; end

错误如下:
错误: 文件:main_menu3d.m 行:30 列:15
等号左侧的表达式不是用于赋值的有效目标。


出错 startkrig (line 44)
    hdl.navigator.h0=main_menu3d;

为避免有的人无法下载(自动回复:请不要使用迅雷等下载工具,点我查看下载帮助)论坛附件,也可前往官网下载该工具箱:
ftp://globec.whoi.edu/pub/software/kriging/easy_krig/
感谢作者!

EasyKrig_V3.0_Matlab2016b.zip

2.17 MB, 下载次数: 30, 下载积分: 金钱 -5

评分

参与人数 1金钱 +4 贡献 +1 收起 理由
暮雪千山 + 4 + 1 赞一个!

查看全部评分

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-7-23 16:01:42 | 显示全部楼层
坐等回复呀
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-7-24 09:03:12 | 显示全部楼层
感谢分享,加分鼓励一下!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2019-7-25 00:14:14 | 显示全部楼层
已经解决,把matlab的系统语言更改为英文就能完美运行,希望大家使用过工具包之后记得致谢作者。
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2019-7-27 07:23:18 | 显示全部楼层
支持一下
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2019-9-25 15:46:00 | 显示全部楼层
支持一下,之前用过dace 工具箱做过克里金插值!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表