Array Error Must be Positive

Respuestas (1)

David K.
David K. el 5 de Mzo. de 2021

0 votos

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)

Categorías

Productos

Etiquetas

Preguntada:

el 5 de Mzo. de 2021

Comentada:

el 5 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by