i tried this:
for i = length(v)
while i + n -1 < length(v)
if all( v(i : i+n-1) ) == true
disp(sum(v(i:i+n-1)))
end
end
end
but i get 7 every time
Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이 질문은 마감되었습니다.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!