I keep getting an error for the array. I'm not sure what is wrong

답변 (1개)

David K.
David K. 2021년 3월 5일

0 개 추천

If you read the whole error message you see this :
Array indices must be positive integers or logical values.
This is caused by the values of t in:
y(t) = ...
The issue in this case is not that they are not positive. It is that they are not integers.
This is actually solved very simply as such:
t = 0:.1:5;
b = [2;4.7;9.2;]
y = 1-exp(-b*t)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

태그

질문:

2021년 3월 5일

댓글:

2021년 3월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by