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!