Effacer les filtres
Effacer les filtres

How to deal with (i-1)th iteration

3 vues (au cours des 30 derniers jours)
Godas Srikar
Godas Srikar le 24 Avr 2020
Réponse apportée : KSSV le 24 Avr 2020
Hi
I am drafting a program that involves "for" loop in which there is a term with A(i-1) in an expression. In this case, for the first iteration, i-1 results to zero but there won't be any value stored for A(0). How to deal with such situation

Réponse acceptée

KSSV
KSSV le 24 Avr 2020
You need to start iteration with 2 ...or take iteration from 1 to n-1.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements 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