another question to solve the locomotive stuff, giving you a example with the not implented code.
I don't want to code the same stuff twice. Thats why I want to jump between lines of code. Is this possible and how?
P=200;DM=1;forn=1:10ifDM==1thenifP>100thenDM=1P=P-60disp('P bigger 100. DM = '+string(DM))elseDM=0P=P+100//instead of writing P = P + 100, I would like ...disp('P smaller 100. DM = '+string(DM))endelse// D == 0 ifP>100thenDM=1disp('P bigger 100. DM = '+string(DM))P=P-30elseDM=0// ... to continue here disp('P smaller 100. DM = '+string(DM))P=P+100 // to use this P = P + 100endenddisp(string(n)+''+string(P))end