Why is the min() and max() function throwing an error?

4 ビュー (過去 30 日間)
EL890
EL890 2018 年 3 月 31 日
コメント済み: AMAL NN 2020 年 11 月 10 日
I have the following vector and am trying to find the minimum and maximum values using the min() and max() functions.
However, it throws the following error:
??? Subscript indices must either be real positive integers or logicals.
Looking online, minval = min(outFHN); should return the minimum value of the vector but it is not working.
I attached the vector to this post if anyone would like to try.
Thanks for the help

採用された回答

David Fletcher
David Fletcher 2018 年 3 月 31 日
min(outFHN)
ans =
-4.1601
I would assume that you have a variable called min in your workspace which is shadowing the min function
  2 件のコメント
EL890
EL890 2018 年 3 月 31 日
Yes, that was the issue. Thank you for your help!
AMAL NN
AMAL NN 2020 年 11 月 10 日
I also had the same issue. Now it's fixed. Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by