How can i compare current iteration in the loop with the previous one? For example, i want to see if the element in the matrix, which is part of a structure, is lower than that same element, but from previous iteration (obviously theese aren't tha same values, but the same elements, just different iterations). To be more clear, i need to call matrix element mystruct(h).field(j,1) and see if that element is lower than mystruct(h-1).field(j,1). h=1:20 and j=1:20. For the first iteration, i'm using other comparison, this is just one of the constraints in the if loop.
Aucun commentaire:
Enregistrer un commentaire