Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
please, how ( index logical work in matlab ) ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
in solvig for example question for f2 (x) function in the range of [-2,5] and so on.
1 commentaire
Réponses (1)
drummer
le 25 Oct 2020
Modifié(e) : drummer
le 25 Oct 2020
MATLAB does not accept negative indexes if you want to walk through your range. It also starts @ 1.
One workaround you can should be:
idx = -3;
for i = 1 : 7
idx = idx + 1
% then you apply your idx into your f2(idx) down here.
end
Cheers
0 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!