Difference between two iteration of for loop
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi I need to have difference between to successive iteration of for loop. As example:
For i=1:n P(i)=statement; end
How can I calculate: DeltaP=P(i)-P(i-1)??!! THANKS
0 Commenti
Risposta accettata
Adam
il 12 Giu 2018
diff( P )
after the for loop should do this for you for all pairs of consecutive elements of P
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!