필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Logical Array and filtering erroneous points

조회 수: 1 (최근 30일)
Andrew
Andrew 2017년 10월 4일
마감: Andrew 2017년 10월 5일
I have a many logical arrays, like the example in the image. I am using bins to extract a certain section of the data for further analysis. Around 0.2x10^4 there is a short section of points that are 1(s). If the section of 1(s) is not longer than 60 continuous 1(s), then I don't want to use that data. I have tried filters, but it does not seem to get all the points. My code is below, and very generic. Are there any ideas on how to ignore these points?
for i = 1:numel(thefiles)
filename = thefiles(i).name;
data{1,i} = open(filename);
%set bins
N_edges = [625 675 1100 1350 1650];
M_edges = [0 250 950 1600 2150 2700];
N_bins = discretize(data{1,i}.N.signals.values,N_edges);
M_bins = discretize(data{1,i}.M.signals.values,M_edges);
%%Assign Bins
idle = (N_bins ==1 & M_bins ==1);
A25 = N_bins ==2 & M_bins ==2;
B25 = N_bins ==3 & M_bins ==2;
C25 = N_bins ==4 & M_bins ==2;
end
  댓글 수: 1
Andrew
Andrew 2017년 10월 5일
편집: Andrew 2017년 10월 5일
I used a movmean(A25,60). Then used another logical A25 = (A25==1). This basically did what I was looking for.
Thanks for anyone who looked at this.

답변 (0개)

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by