Marios - from your code
will always be a scalar (1x1) value which seems incorrect. Should this be an array of values? As for why, nump is always zero
if startPoint == 0
if dna(k) == '1' && dna(k+1) == '4' && dna(k+2) == '3'
startpoint = k;
end
else
note how the condition is for startPoint == 0 but you then initialize startpoint = k....which is a different variable because of the lower-case p. Try changing this to
if startPoint == 0
if dna(k) == '1' && dna(k+1) == '4' && dna(k+2) == '3'
startPoint = k;
end
else
and see what happens.
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/563900-loop-not-working-to-find-min-max-mean#comment_934217
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/563900-loop-not-working-to-find-min-max-mean#comment_934217
Sign in to comment.