Detection of objects

1 vue (au cours des 30 derniers jours)
jyothsna chennareddy
jyothsna chennareddy le 4 Fév 2011
Subscript indices must either be real positive integers or logicals

Réponse acceptée

Sean de Wolski
Sean de Wolski le 4 Fév 2011
is 0 a "real positive integer"?
Unlike other languages, MATLAB begins indexing at 1. e.g.
x(0) => your_error
x(1) => indexes first element
  1 commentaire
jyothsna chennareddy
jyothsna chennareddy le 4 Fév 2011
Thank you so much sir

Connectez-vous pour commenter.

Plus de réponses (1)

Vieniava
Vieniava le 4 Fév 2011
in Matlab vector/matrix indexing starts from 1, not from 0, so you should change for-loop starting value on 1 .
  1 commentaire
jyothsna chennareddy
jyothsna chennareddy le 4 Fév 2011
Thank you mam

Connectez-vous pour commenter.

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by