Statistics and Machine Learning Toolboxのtt​est2などの検定実​行エラーについて解決​方法を教えてください

6 views (last 30 days)
以下のURLの利用可能な仮説検定にあります。ttest2、vartest2などの検定を実行すると以下のエラーが発生します。
実行プログラムは1 2 のURLにあるデモプログラムを実行しているのですが、エラーが発生してしまいます。
matlab2019aとなりますが、少し前まではエラーは発生せず実行できていたのですが、
突然出るようになりました。
ご存じの方、お手数ですが、解決方法を教えていただけないでしょうか。
仮説検定一覧
1 ttest2
2 vartest2
%%ttest2の実行プログラム
>> load examgrades
x = grades(:,1);
y = grades(:,2);
[h,p,ci,stats] = ttest2(x,y)
%エラー内容
関数または変数 'eml_is_const' が未定義です。
エラー: nanvar (line 29)
coder.internal.assert(eml_is_const(dim), ...
エラー: ttest2 (line 173)
s2x = nanvar(x,[],dim);
%% vartest2実行プログラム
>> load examgrades;
x = grades(:,1);
y = grades(:,2);
>> [h,p,ci,stats] = vartest2(x,y)
関数または変数 'eml_invariant' が未定義です。
エラー: coder.internal.sxalloc>mlsxalloc (line 61)
eml_invariant(nargin > n,'MATLAB:minrhs');
エラー: coder.internal.sxalloc (line 28)
y = mlsxalloc(typep,varargin{:});
エラー: fcdf (line 17)
p = coder.internal.sxalloc([true,isfloat(v1),isfloat(v2)],x,v1,v2);
エラー: vartest2 (line 155)
p = 2*min(fcdf(F,df1,df2),fpval(F,df1,df2));

Accepted Answer

Atsushi Ueno
Atsushi Ueno on 26 Apr 2023
Statistics and Machine Learning Toolbox内部の関数が見つからないのですから下記の原因が想定されます。
  • 必要なパス設定が何らかの理由で変化したか失われた
  • 必要なファイルが何らかの理由で失われた
もし何か心当たりがあれば原因調査をすべきですが、同Toolbox(R2019a)を再度インストールし直すのにさほど時間は掛からないので試してみるべきだと思います。
  1 Comment
neshin
neshin on 26 Apr 2023
解決いたしました。ありがとうございました。

Sign in to comment.

More Answers (0)

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!