Effacer les filtres
Effacer les filtres

for loop

1 vue (au cours des 30 derniers jours)
Pan
Pan le 29 Mai 2012
this is my current code
mean(sum(abs(xw(:,:,3,10))-(xw(:,:,3,9))));
this can run and have value but this code could calculate tenth frame and ninth frame
but now, I must calculate the 100 frames that from fourth frame to 100th frames I know to use " for loop", but I can't write please tell me how to do

Réponse acceptée

Image Analyst
Image Analyst le 29 Mai 2012
Let's say that "k" is your for loop index. Then just say:
mean(sum(double(xw(:,:,3, k)) - double(xw(:,:,3, k-1))));
to get the mean column-by-column difference in the blue channels of your video frames.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by