why do i get this error in line 15? "Subscript indices must either be real positive integers or logicals."
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190609/image.png)
1 commentaire
Réponse acceptée
Jan
le 16 Mai 2018
Modifié(e) : Jan
le 16 Mai 2018
Your x(1) is 1.96. Then in the first iteration, where e=1, fj{x(e)} tries to use 1.96 as index of the cell array fj. But as the error message tells you, indices must be positive integers.
I guess you want:
fj(e) = ...
Read doc cell concerning the curly braces and cell arrays.
Are you sure that e and i should be symbolic variables?
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Variables 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!