How can I save the values obtain from a for loop in a nx1 vector?
이전 댓글 표시
x=0:996;
for x=x+4
t=datarng(x-3:x,1);
avg=sum(t)/4;
"datarng" is a variable which the data I am analyzing is being saved to. What I am doing is taking the average of every for numbers and my goal is construct a new matrix (vector) which has all the average values calculated in it. Any help is appreciated! Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!