Why do I get the error 'Subscript indices must either be real positive integers or logicals ' for the below code?

1 次查看(过去 30 天)
xa = (x-xc_t(t)+bx_t(t))/(sr2*betax_t(t));
  4 个评论
Summer
Summer 2015-1-2
True. Time starts at t=0 and then increases. The values of t are already being read from a text file, which was already saved as a 1x61 vector.
I'll check if indexing using the time step number would resolve it.
Thx

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2015-1-2
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?

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by