필터 지우기
필터 지우기

for loop

조회 수: 1 (최근 30일)
Pan
Pan 2012년 5월 29일
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

채택된 답변

Image Analyst
Image Analyst 2012년 5월 29일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by