Hey
I need to substitute the last element of the Steps array with the LastStep value. This is my code for the section;
CycleStep = 0;for k = 1:7 Steps(k) = 1; CycleStep = CycleStep + 1; if CycleStep == 7 LastStep = 10 - Steps(k)*(7 - 1); endend Steps(Steps(7))=LastStep;
but somehow it is substituting the first value of the Steps array. How do I replace the last value of the Steps with the LastStep value?
Best Answer