error: Array indices must be positive integers or logic
1 回表示 (過去 30 日間)
古いコメントを表示

please help
0 件のコメント
回答 (2 件)
Walter Roberson
2024 年 2 月 2 日
Due to floating point round-off, the result A+(B*x(i)) might not be exactly an integer. You should round() it.
2 件のコメント
Walter Roberson
2024 年 2 月 2 日
You have not posted enough context to really give you an answer.
But I suspect that you should have made x one element shorter. Something along the line of
x = linspace(xmin, xmax, number_of_steps+1);
x = x(1:end-1);
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
