Getting error when asking from max and min for negative values.
古いコメントを表示
I have two vector of negative numbers (log values). The first is fine as it has a postive max value and a negative min. But i get an error for the second vector (which has its max and min as negative numbers) when i ask for max or min. What is another option to get these two values??
error: Subscript indices must either be real positive integers or logicals.
2 件のコメント
Rik
2017 年 12 月 27 日
What code are you using? Are you using the min and max functions? The error sounds like you aren't.
Yasmin Samy
2017 年 12 月 27 日
編集済み: Walter Roberson
2017 年 12 月 27 日
採用された回答
その他の回答 (1 件)
Walter Roberson
2017 年 12 月 27 日
0 投票
Do not name a variable min or max. Also do not name a variable sum . Using any of these variable names is quite likely to run into problems when you later try to use the same name as if it were the MATLAB function.
カテゴリ
ヘルプ センター および File Exchange で Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!