2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【TIPS】MATLABで「関数 'xxxx' が未定義です」エラーが出る

Last updated at Posted at 2018-12-26

Note: 本記事は、2018年12月時点の内容です。

【Q】MATLABで「関数 'xxxx' が未定義です」エラーが出る。なんで?

  • 実行時のエラーメッセージ例
関数 'xxx' (タイプ'xxx' の入力引数) が未定義です。

【A】ライセンスに含まれない関数を使用している可能性があります。ライセンスに含まれているか確認しましょう。

作業の手順

  1. whichコマンドでパスの確認

【手順1】whichコマンドでパスの確認

  • MATLABのコマンドウインドウにて、以下コマンドを実行
>> which <function name> -all
  • インストールされていない場合
>> which xxx -all

'xxx' が見つかりません。
  • インストールされている場合、関数のパスが表示される
>> which abs -all

built-in (C:\Program Files\MATLAB\XXX\toolbox\matlab\elfun\@double\abs)   % double method
・・・(以下、略)・・・
  • インストールされていない場合、MathworksのWebサイトでどのToolboxに含まれるかを確認しましょう。

  • 有償Toolboxの場合、ライセンスを購入しましょう。

参考資料

なぜ「関数または変数 'xxxx' が未定義です。」のエラーが発生するのですか?

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?