error: Array indices must be positive integers or logic
조회 수: 2 (최근 30일)
이전 댓글 표시
답변 (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!