index must be a positive integer or logical
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
sabrina
le 18 Mai 2014
Réponse apportée : Mischa Kim
le 18 Mai 2014
Hi, Please how to solve this problem : "Attempted to access f(0); index must be a positive integer or logical" thnks
0 commentaires
Réponse acceptée
Mischa Kim
le 18 Mai 2014
Sabrina, difficult to say without seeing the code. However, in MATLAB indexing starts with 1, not 0:
>> a = [4 3 2 1]
a =
4 3 2 1
>> a(0)
Subscript indices must either be real positive integers or logicals.
>> a(1)
ans =
4
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!