필터 지우기
필터 지우기

removing rows in a loop of excel

조회 수: 1 (최근 30일)
Tian Tian
Tian Tian 2018년 2월 15일
편집: Birdman 2018년 2월 15일
Hi, I want to compare paired excels in a folder. In the loop, i hope to select rows with columnB similar to previous one.
for i=1 : LengthB1 % B1 is the columnB from excel1
for j=1 : LengthB2 %B2 is the columnB from excel2
cellB1(i)=columnB1(i,1);
cellB2(j)=columnB2(j,1);
if cellB2(j)<=cellB1(i)*1.5 & cellB2>=cellB1*0.5
na=na+1
My questions are: 1) for i=1, j=5 and 10 both are good, but i want to get only one with the closest distance from B2 to B1 from j ; 2) for i=1, if j=5 is selected, then for i=2, i hope the loop of j can skip j=5. Can anyone give me a hand? Many thanks in advance.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by