Trying to repeat this for loop
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
1 Commento
Azzi Abdelmalek
il 7 Mag 2013
Why did you delete the question?
Risposte (1)
Azzi Abdelmalek
il 3 Mag 2013
Modificato: Azzi Abdelmalek
il 3 Mag 2013
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 Commenti
tunny
il 3 Mag 2013
Azzi Abdelmalek
il 3 Mag 2013
Modificato: Azzi Abdelmalek
il 3 Mag 2013
you can use diff function
d=diff(p(1:100))
result=d==0
out=sum(result)
tunny
il 3 Mag 2013
Azzi Abdelmalek
il 3 Mag 2013
Modificato: Azzi Abdelmalek
il 3 Mag 2013
Yes
p=[1 4 10 18]
diff(p)=[4-1 10-4 18-10]
tunny
il 3 Mag 2013
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!