在 Octave 中解析错误子类和类定义

问题描述

上次我问 here 如何在另一个函数调用参数。 那时,多亏了有用的建议,我注意到我在类定义中犯了错误。所以我想将 classdef 放入我的代码中。但它总是发生语法错误。所以,我的代码是这样的。

classdef dataimport %%superclass
  methods
   function pushbutton_Callback = dataimport(hObject,eventdata,handles)
            fileName            = uigetfile('*.xlsx')%%excel data import
            handles.fileName    = fileName;
            eval('fileName')
            guidata(hObject,handles)
    endfunction
   endmethods
endclassdef

classdef axisXimport < dataimport %%subclass
  methods
   function popupmenuX_Callback = axisXimport(hObject,handles)
            fileName            = pushbutton_Callback@dataimport(hObject,handles) %%methodname@parentclassname(args)
            handles.fileName    = fileName;
           [numbers,colNames]  = xlsread(fileName);
       set(hObject,'string',colNames);
    endfunction
   endmethods
endclassdef

错误从第一行弹出,这里(classdef dataimport

>> versuch2

error: parse error near line 49 of file C:\Users\DEBIECHON\Desktop\Octave\versuch2.m

  Syntax error

通过调用 Superclass 参数,我在 Octave 站点中看到了 this sitethis。但我真的不明白为什么它会导致第一行出错。

非常感谢阅读我的问题并致以最诚挚的问候!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)