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!