2

大規模なバッチ プロセスの一部としてヘッドレス サーバー上で実行される実行可能ファイルとしてコンパイルしようとしている Matlab スクリプトがあります。このスクリプトは、数人の非プログラマー (科学者) によって 10 年以上にわたって記述された関数とクラスを呼び出しますが、コンパイルするのに苦労しています。

スクリプトは Matlab インスタンスで実行されますが、MCC でよくわからないエラーが表示されます。

Compiler version: 5.1 (R2014a)
Dependency analysis by REQUIREMENTS.
Error using matlab.depfun.internal.MatlabSymbol/proxy (line 405)
Internal1 Error: Could not determine class of method
"/home/me/MyCode/@tsd/Data.m". Number of classes checked:
17.

@tsd/tsd.m は次のようになります。

function tsa = tsd(t, Data)

% tsd  Creates tsd object (tsd = class of timestamped arrays of data)
%
% tsa = tsd(t, Data)
%
% INPUTS: 
%       t - list of timestamps - must be sequential, but don't have to be continuous
%       Data - data, possibly an array. If data is n-dimensional, then time should be the FIRST axis.
% OUTPUTS: 
%       tsa - a tsd object
%
% Completely compatible with ctsd.
%
% Methods
%    tsd/Range     - Timestamps used
%    tsd/Data      - Returns the data component
%    tsd/DT        - Returns the DT value (mean diff(timestamps))
%    tsd/StartTime - First timestamp
%    tsd/EndTime   - Last timestamp
%    tsd/Restrict  - Keep data within a certain range
%    tsd/CheckTS   - Makes sure that a set of tsd & ctsd objects have identical start and end times
%    tsd/cat       - Concatenate ctsd and tsd objects
%    tsd/Mask      - Make all non-mask values NaN
%
% ADR 1998, version L4.0, last modified '98 by ADR

% RELEASED as part of MClust 2.0
% See standard disclaimer in ../Contents.m


if nargin == 0
 tsa.t = NaN;
 tsa.data = NaN;
 tsa = class(tsa, 'tsd');
 return
end 

if nargin < 2
  error('tsd constructor must be called with T, Data');
end

tsa.t = t;
tsa.data = Data;

tsa = class(tsa, 'tsd');

および Data.m ファイル:

function v = Data(tsa, ix)

% tsd/Data  Retrieves data from tsd
%
%   d = Data(tsa)
%   d = Data(tsa, ix)
%
% INPUTS:
%       tsa - tsd object
%       ix - alignment list (timestamps)
% OUTPUTS:
%       v - the tsa.Data
%
%   if called with alignment list, returns those tsa.Data(ix)
%   if called without, returns complete tsa.Data
%
% ADR 1998, version L4.1, last modified '98 by ADR

% RELEASED as part of MClust 2.0
% See standard disclaimer in ../Contents.m


switch nargin
case 2
   f = findAlignment(tsa, ix);
   v = SelectAlongFirstDimension(tsa.data,f);
case 1
   v = tsa.data;
otherwise
   error('Unknown number of input arguments');
end

そのため、tsd 関数を呼び出すスクリプトは、Matlab セッションで単に find を実行しますが、コンパイラは上記のエラーをスローします。Matlab を使用するのはこれが初めてで、完全に困惑しています。「Data」という名前のメソッドを持つ別のクラスがありますが、それはこの問題を引き起こさないはずです。

4

1 に答える 1