how to store values in an array in a loop ??
조회 수: 1 (최근 30일)
이전 댓글 표시
i want to store values in an array in a loop , n then take its average , continously delete them as well after 10 frames of a video..........
댓글 수: 0
답변 (1개)
Victor
2011년 5월 21일
Dear Arooj,
I have written a simple code for you, you can adopt it to yours.
clc;clear;
array = [];
for i=1:1:5
array2=i;
array=[array; array2];
end
b=numel(array);
c=sum(array)/b
% for deleting after 10 frames you can put it in another loop
Good luck
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!