Trying to repeat this for loop
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
댓글 수: 1
Azzi Abdelmalek
2013년 5월 7일
Why did you delete the question?
답변 (1개)
Azzi Abdelmalek
2013년 5월 3일
편집: Azzi Abdelmalek
2013년 5월 3일
put the loop inside another loop. Can give more details how do you want to repeat this loop?
Edit
d=diff(p(1:100))
result=d==0
out=sum(result)
댓글 수: 5
tunny
2013년 5월 3일
Azzi Abdelmalek
2013년 5월 3일
편집: Azzi Abdelmalek
2013년 5월 3일
you can use diff function
d=diff(p(1:100))
result=d==0
out=sum(result)
tunny
2013년 5월 3일
Azzi Abdelmalek
2013년 5월 3일
편집: Azzi Abdelmalek
2013년 5월 3일
Yes
p=[1 4 10 18]
diff(p)=[4-1 10-4 18-10]
tunny
2013년 5월 3일
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!