AA=Df{1,1};
AAA=AA;
for i=1:length(AA)
if AA(i) <1 || AA(i)>2
AAA(i)=[];
end
end
I am trying to filter data that is between 2 values into a new matrix. Whenever I run this code I get the error
Matrix index is out of range for deletion.
Error in Analyze (line 279)
AAA(i)=[];

 채택된 답변

VBBV
VBBV 2020년 12월 1일

1 개 추천

AA(AA<1|AA>2) = []

댓글 수: 1

Andrew Stark
Andrew Stark 2020년 12월 1일
Is there a way to leave it empty so that the matrix is the same size?

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Filter Banks에 대해 자세히 알아보기

질문:

2020년 12월 1일

댓글:

2020년 12월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by