Bin my Data set

조회 수: 2 (최근 30일)
Kaelyn
Kaelyn 2012년 12월 1일
Hello I am trying to bin my data down. I have a data set and when I graph it I do not want to it be the raw data exactly. so far I have I don't know where to go from here. I am trying to get the velocity numbers that are between 1 and 2 and take the average and plot this point.
%Code
v=data(:,2); w=zeros(1,13);
for j=1:9995 %number of data points
for i=1:14;___ % velocity parameters
if v(i)>1 && v(i)<=2;
w(i+1)=w(i+1)+v(j);
N=mean(w(i+1));
end
end
end
figure(1) plot(N,'*');

채택된 답변

Matt Fig
Matt Fig 2012년 12월 1일
편집: Matt Fig 2012년 12월 1일
v = data(:,2); % Velocity
mv12 = mean(v(v>=1 & v<=2)) % Mean of velocity on [1 2].
  댓글 수: 1
Kaelyn
Kaelyn 2012년 12월 1일
Thanks it gave me the right answer :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by