Why do I get the error 'Subscript indices must either be real positive integers or logicals ' for the below code?
Mostrar comentarios más antiguos
xa = (x-xc_t(t)+bx_t(t))/(sr2*betax_t(t));
4 comentarios
Azzi Abdelmalek
el 2 de En. de 2015
Can you give more details?
dpb
el 2 de En. de 2015
why? I'd guess most likely because you start with t==0
Don't use a time value as the indexing expression; use a time step number and an associated vector of actual times.
Summer
el 2 de En. de 2015
Summer
el 2 de En. de 2015
Respuestas (1)
Image Analyst
el 2 de En. de 2015
t is either 0, negative, or some fractional value, like 3.00023 or something. If, before that line you put
format long
t
what does it show in the command window? How did you define t in the first place?
1 comentario
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!