std function won't execute

7 ビュー (過去 30 日間)
Priyansh Arya
Priyansh Arya 2020 年 11 月 12 日
コメント済み: Priyansh Arya 2020 年 11 月 12 日
Whenever I'm using std function to calculate the standatd deviation, it is showing "Attempt to execute SCRIPT std as a function:". The error is only being displayed while using std function, and not with other functions.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 12 日
This means that you have created a file named 'std.m' in MATLAB path, which is shadowing MATLAB's builtin std() function. You can run the following line
which std
It will show you the path to file that is shadowing std(). Rename the file to something else.
  1 件のコメント
Priyansh Arya
Priyansh Arya 2020 年 11 月 12 日
Thank you so much. I was stuck due to this problem from more than a week. This helped!

サインインしてコメントする。

その他の回答 (1 件)

madhan ravi
madhan ravi 2020 年 11 月 12 日
You have a file named std.m , rename it or remove it from the path.
  1 件のコメント
Priyansh Arya
Priyansh Arya 2020 年 11 月 12 日
This helped! Thanks a lot!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by