error: Array indices must be positive integers or logic
이전 댓글 표시
답변 (2개)
Walter Roberson
2024년 2월 2일
0 개 추천
Due to floating point round-off, the result A+(B*x(i)) might not be exactly an integer. You should round() it.
댓글 수: 2
Kayla Garcia
2024년 2월 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);
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

